Skip to content

Commit fb4207c

Browse files
committed
fix: improve namespace handling for SVG and MathML tags
1 parent 1b28566 commit fb4207c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/compiler-dom/src/parserOptions.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export const parserOptions: ParserOptions = {
2424
let ns = parent ? parent.ns : rootNamespace
2525
if (parent && ns === Namespaces.MATH_ML) {
2626
if (parent.tag === 'annotation-xml') {
27-
if (tag === 'svg') {
27+
if (isSVGTag(tag)) {
2828
return Namespaces.SVG
2929
}
3030
if (
@@ -57,10 +57,10 @@ export const parserOptions: ParserOptions = {
5757
}
5858

5959
if (ns === Namespaces.HTML) {
60-
if (tag === 'svg') {
60+
if (isSVGTag(tag)) {
6161
return Namespaces.SVG
6262
}
63-
if (tag === 'math') {
63+
if (isMathMLTag(tag)) {
6464
return Namespaces.MATH_ML
6565
}
6666
}

0 commit comments

Comments
 (0)