Closed TheJaredWilcurt closed 1 week ago
SVG elements can be represented as self closing tags, like <path />.
<path />
const SELF_CLOSING_SVG_ELEMENTS = Object.freeze([ 'circle', 'ellipse', 'line', 'path', 'polygon', 'polyline', 'rect', 'stop', 'use' ]); const VOID_ELEMENTS = Object.freeze([ ...SELF_CLOSING_SVG_ELEMENTS, 'area', 'base', 'br', 'col', 'embed', 'hr', 'img', 'input', 'link', 'meta', 'param', 'source', 'track', 'wbr' ]);
I think that is fine for now. I could see breaking this up in the future to a conditional boolean of svgElementsAreVoid with a default of true. But I'm assuming most people won't care, so this setting can be skipped until someone requests it.
svgElementsAreVoid
SVG elements can be represented as self closing tags, like
<path />
.I think that is fine for now. I could see breaking this up in the future to a conditional boolean of
svgElementsAreVoid
with a default of true. But I'm assuming most people won't care, so this setting can be skipped until someone requests it.