diff --git a/.changeset/unlucky-gifts-mate.md b/.changeset/unlucky-gifts-mate.md new file mode 100644 index 0000000..d6b8a7a --- /dev/null +++ b/.changeset/unlucky-gifts-mate.md @@ -0,0 +1,5 @@ +--- +"ultrahtml": patch +--- + +Fix edge case with ` in live string", async () => { + const input = await fetch("https://developer.mozilla.org/en-US/docs/Web/API/HTML_Sanitizer_API").then(r => r.text()); + let meta = 0; + await walk(parse(input), async (node, parent) => { + if (node.type === ELEMENT_NODE && node.name === 'meta' && parent?.name === 'head') { + meta++; + } + }) + expect(meta).toEqual(11); + }) }); describe("style", () => {