Skip to content

Commit

Permalink
add other tags
Browse files Browse the repository at this point in the history
dbushell committed Oct 4, 2024

Verified

This commit was signed with the committer’s verified signature.
1 parent 1204d53 commit 85cf4ac
Showing 1 changed file with 118 additions and 0 deletions.
118 changes: 118 additions & 0 deletions src/html-tags.ts
Original file line number Diff line number Diff line change
@@ -35,6 +35,95 @@ export const inlineTags: Set<string> = new Set([
'var',
'wbr'
]);
/**
* Complete list of HTML elements (excluding inline)
* {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element}
*/
export const blockTags: Set<string> = new Set([
'address',
'area',
'article',
'aside',
'audio',
'base',
'blockquote',
'body',
'button',
'canvas',
'caption',
'col',
'colgroup',
'datalist',
'dd',
'details',
'dialog',
'div',
'dl',
'dt',
'embed',
'fieldset',
'figcaption',
'figure',
'footer',
'form',
'h1',
'h2',
'h3',
'h4',
'h5',
'h6',
'head',
'header',
'hgroup',
'hr',
'html',
'iframe',
'img',
'input',
'label',
'legend',
'li',
'link',
'main',
'map',
'menu',
'meta',
'meter',
'nav',
'noscript',
'object',
'ol',
'optgroup',
'option',
'output',
'p',
'param',
'picture',
'pre',
'progress',
'script',
'search',
'section',
'select',
'slot',
'source',
'style',
'summary',
'svg',
'table',
'tbody',
'td',
'template',
'textarea',
'tfoot',
'th',
'thead',
'title',
'tr',
'track',
'ul',
'video'
]);

/**
* Complete list of HTML void elements
@@ -57,6 +146,35 @@ export const voidTags: Set<string> = new Set([
'wbr'
]);

/**
* Complete list of HTML void elements
* {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element#obsolete_and_deprecated_elements}
*/
export const obsoleteTags: Set<string> = new Set([
'acronym',
'big',
'center',
'content',
'dir',
'font',
'frame',
'frameset',
'image',
'marquee',
'menuitem',
'nobr',
'noembed',
'noframes',
'param',
'plaintext',
'rb',
'rtc',
'shadow',
'strike',
'tt',
'xmp'
]);

/**
* List of HTML elements to avoid parsing inside
*/

0 comments on commit 85cf4ac

Please sign in to comment.