diff --git a/src/language-html/parser-html.js b/src/language-html/parser-html.js index 2e5322ac4179..972088eb4954 100644 --- a/src/language-html/parser-html.js +++ b/src/language-html/parser-html.js @@ -256,19 +256,32 @@ function parseIeConditionalComment(node, parseHtml) { const [, openingTagSuffix, condition, data] = match; const offset = " + if (node.type === "ieConditionalComment" && !node.complete) { + return true; + } + // TODO: handle non-text children in
if ( isPreLikeNode(node) && diff --git a/tests/html_comments/__snapshots__/jsfmt.spec.js.snap b/tests/html_comments/__snapshots__/jsfmt.spec.js.snap index d34082746ecf..5e796d0c0f9c 100644 --- a/tests/html_comments/__snapshots__/jsfmt.spec.js.snap +++ b/tests/html_comments/__snapshots__/jsfmt.spec.js.snap @@ -91,6 +91,14 @@ exports[`conditional.html - html-verify 1`] = `