From c71929b5db23c74399da48dfe987591e35ba3b90 Mon Sep 17 00:00:00 2001 From: David Ortner Date: Sun, 24 Mar 2024 16:10:30 +0100 Subject: [PATCH] fix: [#1288] Adds support for parsing shorthand comments --- packages/happy-dom/src/xml-parser/XMLParser.ts | 10 +++++----- .../test/custom-element/CustomElementRegistry.test.ts | 1 - packages/happy-dom/test/xml-parser/XMLParser.test.ts | 1 + .../happy-dom/test/xml-parser/data/XMLParserHTML.ts | 1 + 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/packages/happy-dom/src/xml-parser/XMLParser.ts b/packages/happy-dom/src/xml-parser/XMLParser.ts index ccf5d3084..04e1fed1a 100755 --- a/packages/happy-dom/src/xml-parser/XMLParser.ts +++ b/packages/happy-dom/src/xml-parser/XMLParser.ts @@ -24,7 +24,7 @@ import HTMLElementConfigContentModelEnum from '../config/HTMLElementConfigConten * Group 8: End of start tag (e.g. ">" in "
"). */ const MARKUP_REGEXP = - /<([a-zA-Z0-9-]+)|<\/([a-zA-Z0-9-]+)\s*>|||') .replace('', '') .replace('', '') + .replace('', '') .replace('', ''); diff --git a/packages/happy-dom/test/xml-parser/data/XMLParserHTML.ts b/packages/happy-dom/test/xml-parser/data/XMLParserHTML.ts index cfc0bafb0..fea879fc1 100644 --- a/packages/happy-dom/test/xml-parser/data/XMLParserHTML.ts +++ b/packages/happy-dom/test/xml-parser/data/XMLParserHTML.ts @@ -13,6 +13,7 @@ export default ` Bold Span +