From ccb8f74e77b7b8ec219567acbe27453b2972be25 Mon Sep 17 00:00:00 2001 From: Geremia Taglialatela Date: Fri, 31 Jan 2025 09:41:41 +0100 Subject: [PATCH 1/2] Place HTML5 element on a new line This commit reformats the AUTO_BUILD_ELEMENTS list within the HTML module. Each element now occupies a separate line. Previously, the list was densely packed, making it harder to read and maintain. This change: - Improves readability by providing visual separation between elements. - Facilitates easier sorting, both manually and potentially with future tooling. - Reduces the scope of diffs when the list is modified. Future changes will only affect the relevant lines, not the entire list. --- lib/arbre/html/html5_elements.rb | 118 ++++++++++++++++++++++++++++--- 1 file changed, 107 insertions(+), 11 deletions(-) diff --git a/lib/arbre/html/html5_elements.rb b/lib/arbre/html/html5_elements.rb index e32078c0..8b1e3837 100644 --- a/lib/arbre/html/html5_elements.rb +++ b/lib/arbre/html/html5_elements.rb @@ -2,17 +2,113 @@ module Arbre module HTML - AUTO_BUILD_ELEMENTS = [ :a, :abbr, :address, :area, :article, :aside, :audio, :b, :base, - :bdo, :blockquote, :body, :br, :button, :canvas, :caption, :cite, - :code, :col, :colgroup, :command, :datalist, :dd, :del, :details, - :dfn, :div, :dl, :dt, :em, :embed, :fieldset, :figcaption, :figure, - :footer, :form, :h1, :h2, :h3, :h4, :h5, :h6, :head, :header, :hgroup, - :hr, :html, :i, :iframe, :img, :input, :ins, :keygen, :kbd, :label, - :legend, :li, :link, :main, :map, :mark, :menu, :menuitem, :meta, :meter, :nav, :noscript, - :object, :ol, :optgroup, :option, :output, :param, :pre, :progress, :q, - :s, :samp, :script, :section, :select, :small, :source, :span, - :strong, :style, :sub, :summary, :sup, :svg, :table, :tbody, :td, - :textarea, :tfoot, :th, :thead, :time, :title, :tr, :track, :ul, :var, :video, :wbr ] + AUTO_BUILD_ELEMENTS = [ + :a, + :abbr, + :address, + :area, + :article, + :aside, + :audio, + :b, + :base, + :bdo, + :blockquote, + :body, + :br, + :button, + :canvas, + :caption, + :cite, + :code, + :col, + :colgroup, + :command, + :datalist, + :dd, + :del, + :details, + :dfn, + :div, + :dl, + :dt, + :em, + :embed, + :fieldset, + :figcaption, + :figure, + :footer, + :form, + :h1, + :h2, + :h3, + :h4, + :h5, + :h6, + :head, + :header, + :hgroup, + :hr, + :html, + :i, + :iframe, + :img, + :input, + :ins, + :kbd, + :keygen, + :label, + :legend, + :li, + :link, + :main, + :map, + :mark, + :menu, + :menuitem, + :meta, + :meter, + :nav, + :noscript, + :object, + :ol, + :optgroup, + :option, + :output, + :param, + :pre, + :progress, + :q, + :s, + :samp, + :script, + :section, + :select, + :small, + :source, + :span, + :strong, + :style, + :sub, + :summary, + :sup, + :svg, + :table, + :tbody, + :td, + :textarea, + :tfoot, + :th, + :thead, + :time, + :title, + :tr, + :track, + :ul, + :var, + :video, + :wbr + ] HTML5_ELEMENTS = [ :p ] + AUTO_BUILD_ELEMENTS From be063a9baf9ca311787b948f8bedee6e56f3bb65 Mon Sep 17 00:00:00 2001 From: Geremia Taglialatela Date: Fri, 31 Jan 2025 10:47:42 +0100 Subject: [PATCH 2/2] Add some missing HTML5 elements Source: https://developer.mozilla.org/en-US/docs/Web/HTML New, non experimental, non deprecated elements: - - - - - - - - - -