Clean up html tag settings

This commit is contained in:
Liam Newman 2019-01-15 12:25:53 -08:00
parent 52740fda30
commit fe3e18acfe

View File

@ -43,16 +43,19 @@ function Options(options) {
this.wrap_attributes_indent_size = this._get_number('wrap_attributes_indent_size', this.indent_size);
this.extra_liners = this._get_array('extra_liners', ['head', 'body', '/html']);
// Block vs inline elements
// https://developer.mozilla.org/en-US/docs/Web/HTML/Block-level_elements
// https://developer.mozilla.org/en-US/docs/Web/HTML/Inline_elements
// https://www.w3.org/TR/html5/dom.html#phrasing-content
this.inline = this._get_array('inline', [
// https://www.w3.org/TR/html5/dom.html#phrasing-content
'a', 'abbr', 'area', 'audio', 'b', 'bdi', 'bdo', 'br', 'button', 'canvas', 'cite',
'code', 'data', 'datalist', 'del', 'dfn', 'em', 'embed', 'i', 'iframe', 'img',
'input', 'ins', 'kbd', 'keygen', 'label', 'map', 'mark', 'math', 'meter', 'noscript',
'object', 'output', 'progress', 'q', 'ruby', 's', 'samp', /* 'script', */ 'select', 'small',
'span', 'strong', 'sub', 'sup', 'svg', 'template', 'textarea', 'time', 'u', 'var',
'video', 'wbr', 'text',
// prexisting - not sure of full effect of removing, leaving in
'acronym', 'address', 'big', 'dt', 'ins', 'strike', 'tt'
// obsolete inline tags
'acronym', 'big', 'strike', 'tt'
]);
this.void_elements = this._get_array('void_elements', [
// HTLM void elements - aka self-closing tags - aka singletons
@ -64,9 +67,10 @@ function Options(options) {
// Doctype and xml elements
'!doctype', '?xml',
// ?php and ?= tags
'?php', '?=',
// other tags that were in this list, keeping just in case
// obsolete tags
// basefont: https://www.computerhope.com/jargon/h/html-basefont-tag.htm
// isndex: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/isindex
'basefont', 'isindex'
]);
this.unformatted = this._get_array('unformatted', []);