Skip to content

Commit ee81c5f

Browse files
author
nikhil6393
committed
fix: allow MathML elements in template compiler
1 parent eacdffb commit ee81c5f

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

packages/@lwc/engine-server/src/__tests__/fixtures.spec.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,7 @@ async function compileFixture({
101101
// IGNORED_SLOT_ATTRIBUTE_IN_CHILD is fine; it is used in some of these tests
102102
message.includes('LWC1201') ||
103103
message.includes('-h-t-m-l') ||
104-
code === 'CIRCULAR_DEPENDENCY' ||
105-
// TODO [#5010]: template-compiler -> index -> validateElement generates UNKNOWN_HTML_TAG_IN_TEMPLATE for MathML elements
106-
message.includes('LWC1123');
104+
code === 'CIRCULAR_DEPENDENCY';
107105
if (!shouldIgnoreWarning) {
108106
throw new Error(message);
109107
}

packages/@lwc/template-compiler/src/parser/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1681,6 +1681,7 @@ function validateElement(
16811681
ast.isBaseLwcElement(element) ||
16821682
KNOWN_HTML_AND_SVG_ELEMENTS.has(tag) ||
16831683
SUPPORTED_SVG_TAGS.has(tag) ||
1684+
namespace === MATHML_NAMESPACE ||
16841685
DASHED_TAGNAME_ELEMENT_SET.has(tag);
16851686

16861687
if (!isKnownTag) {

0 commit comments

Comments
 (0)