Skip to content

Commit

Permalink
[fix] enhance regex for IE conditionals, fixes #11
Browse files Browse the repository at this point in the history
  • Loading branch information
pisandelli committed Aug 22, 2014
1 parent a06237d commit 235d409
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ Helpers.prototype.text = function text(element, data) {
* @api public
*/
Helpers.prototype.comment = function comment(element) {
if (this.config.conditionals && /\[if.+IE[\s\d]*\]>.+<\!\[endif\]/g.test(element.data)) {
if (this.config.conditionals && /\[if.*IE[\s\d]*\]\>(?:[^\n]*(\n*))+\<!\[endif\]/gi.test(element.data)) {
return '<!--' + element.data + '-->';
}

Expand Down

0 comments on commit 235d409

Please sign in to comment.