Skip to content

Commit

Permalink
Merge pull request #85 from mrf345/testing
Browse files Browse the repository at this point in the history
Enable html `remove_empty_space` runtime option
  • Loading branch information
mrf345 authored May 7, 2023
2 parents 2efc82f + d377994 commit 99754a2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion flask_minify/about.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "0.41"
__version__ = "0.42"
__doc__ = "Flask extension to minify html, css, js and less."
__license__ = "MIT"
__author__ = "Mohamed Feddad"
Expand Down
1 change: 1 addition & 0 deletions flask_minify/parsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ class Html(ParserMixin):
runtime_options = _o = {
"remove_comments": True,
"remove_optional_attribute_quotes": False,
"remove_empty_space": True,
"only_html_content": False,
"script_types": [],
"minify_inline": _default_tags,
Expand Down
10 changes: 5 additions & 5 deletions tests/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
]
)

MINIFED_HTML = b"<html> <body> <h1> HTML </h1> </body> </html>"
MINIFED_HTML = b"<html><body><h1> HTML </h1></body></html>"

MINIFIED_JS = b'<script>["J","S"].reduce(function(a,r){return a+r})</script>'

Expand All @@ -107,13 +107,13 @@
MINIFED_HTML_EMBEDDED_TAGS = bytes(
"".join(
[
"<html> ",
"<html>",
MINIFIED_JS.decode("utf-8"),
' <script type="text/script" src="testing/88.js"></script> ',
'<script type="text/script" src="testing/88.js"></script>',
MINIFED_LESS.decode("utf-8"),
' <script type="application/script" src="testing/1.js"></script> ',
'<script type="application/script" src="testing/1.js"></script>',
MINIFIED_JS.decode("utf-8"),
' <script src="testing/nested/2.js"></script> </html>',
'<script src="testing/nested/2.js"></script></html>',
]
).encode("utf-8")
)
Expand Down

0 comments on commit 99754a2

Please sign in to comment.