fix: always close tags when namespace is foreign (#12623)

pull/12613/head
Simon H 2 months ago committed by GitHub
parent 32af9434bc
commit c9e9e90659
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -95,7 +95,7 @@ export function RegularElement(node, context) {
);
}
if (!VoidElements.includes(node.name) && namespace !== 'foreign') {
if (!VoidElements.includes(node.name) || namespace === 'foreign') {
state.template.push(b.literal(`</${node.name}>`));
}

@ -1,7 +1,9 @@
import { test } from '../../test';
export default test({
skip: true, // TODO: needs fixing
// TODO: needs fixing. Can only be fixed once we also support document.createElementNS-style creation of elements
// because the $.template('...') approach has no option to preserve attribute name casing
skip: true,
html: `
<page horizontalAlignment="center">

Loading…
Cancel
Save