UNPKG

@markuplint/ml-spec

Version:

Types and schema that specs of the Markup languages for markuplint

22 lines (21 loc) 351 B
/** * @see https://html.spec.whatwg.org/multipage/syntax.html#void-elements */ const voidElements = new Set([ 'area', 'base', 'br', 'col', 'embed', 'hr', 'img', 'input', 'link', 'meta', 'source', 'track', 'wbr', ]); export function isVoidElement(el) { return voidElements.has(el.localName); }