diff --git a/.changeset/html-comment-in-open-tag.md b/.changeset/html-comment-in-open-tag.md new file mode 100644 index 00000000..13c92d7e --- /dev/null +++ b/.changeset/html-comment-in-open-tag.md @@ -0,0 +1,5 @@ +--- +"htmljs-parser": minor +--- + +An ` id="b">` reports the comment rather than silently parsing as `class=("a" < !--note)` plus two junk attributes. diff --git a/src/__tests__/fixtures/attr-value-html-comment-in-regex/__snapshots__/attr-value-html-comment-in-regex.expected.txt b/src/__tests__/fixtures/attr-value-html-comment-in-regex/__snapshots__/attr-value-html-comment-in-regex.expected.txt new file mode 100644 index 00000000..2a977d45 --- /dev/null +++ b/src/__tests__/fixtures/attr-value-html-comment-in-regex/__snapshots__/attr-value-html-comment-in-regex.expected.txt @@ -0,0 +1,10 @@ +1╭─