Skip to content

Commit

Permalink
control flag for conditional comments minification
Browse files Browse the repository at this point in the history
fixes #563
  • Loading branch information
alexlamsl committed Mar 21, 2016
1 parent bbffbc1 commit 76624d5
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 9 deletions.
4 changes: 2 additions & 2 deletions dist/htmlminifier.js
Original file line number Diff line number Diff line change
Expand Up @@ -883,9 +883,9 @@
}

function cleanConditionalComment(comment, options) {
return comment.replace(/^(\[if\s[^\]]+\]>)([\s\S]*?)(<!\[endif\])$/, function(match, prefix, text, suffix) {
return options.processConditionalComments ? comment.replace(/^(\[if\s[^\]]+\]>)([\s\S]*?)(<!\[endif\])$/, function(match, prefix, text, suffix) {
return prefix + minify(text, options, true) + suffix;
});
}) : comment;
}

function removeCDATASections(text) {
Expand Down
Loading

0 comments on commit 76624d5

Please sign in to comment.