Skip to content

Commit a1f6934

Browse files
author
Juan Carlos
committed
Fix html min
1 parent a9b195e commit a1f6934

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

css_html_js_minify/html_minifier.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,8 @@ def remove_html_comments(html):
9797
>>> _+= "<!-- kill me please -->keep" ; remove_html_comments(_)
9898
'<!-- build:dev -->a<!-- endbuild -->b<!--[if IE 7]>c<![endif]--> keep'
9999
""" # Grunt uses comments to as build arguments, bad practice but still.
100-
log.debug("""Removing all unnecessary HTML comments; Keep all containing:
101-
'build:', 'endbuild', '<!--[if]>', '<![endif]-->' for Grunt/Grymt, IE.""")
102-
return re.compile(r'<!-- [^(build|endbuild)].*? -->', re.I).sub('', html)
100+
log.debug("""Removing all unnecessary HTML comments.""")
101+
return re.compile(r'<!-- .*? -->', re.I).sub('', html)
103102

104103

105104
def unquote_html_attributes(html):

0 commit comments

Comments
 (0)