Skip to content

Commit bc8232b

Browse files
committed
account for foreign namespace
1 parent 5966d7b commit bc8232b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

packages/svelte/src/compiler/phases/2-analyze/validation.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -570,8 +570,12 @@ const validation = {
570570
}
571571
}
572572

573-
const is_self_closing = context.state.analysis.source[node.end - 2] === '/';
574-
if (is_self_closing && !VoidElements.includes(node.name) && !SVGElements.includes(node.name)) {
573+
if (
574+
context.state.analysis.source[node.end - 2] === '/' &&
575+
context.state.options.namespace !== 'foreign' &&
576+
!VoidElements.includes(node.name) &&
577+
!SVGElements.includes(node.name)
578+
) {
575579
warn(
576580
context.state.analysis.warnings,
577581
node,

0 commit comments

Comments
 (0)