Skip to content

Commit

Permalink
feat: enable html remove_empty_space runtime option
Browse files Browse the repository at this point in the history
resolves #84
  • Loading branch information
mrf345 committed May 7, 2023
1 parent 073be80 commit bd0f0a0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
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 bd0f0a0

Please sign in to comment.