From fe3e18acfe75448db1da5244449851242dec68cb Mon Sep 17 00:00:00 2001 From: Liam Newman Date: Tue, 15 Jan 2019 12:25:53 -0800 Subject: [PATCH] Clean up html tag settings --- js/src/html/options.js | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/js/src/html/options.js b/js/src/html/options.js index 68b2adee..ad5f9a45 100644 --- a/js/src/html/options.js +++ b/js/src/html/options.js @@ -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', []);