Skip to content

Commit

Permalink
Place HTML5 element on a new line
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
tagliala committed Jan 31, 2025
1 parent 0405ce9 commit ccb8f74
Showing 1 changed file with 107 additions and 11 deletions.
118 changes: 107 additions & 11 deletions lib/arbre/html/html5_elements.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit ccb8f74

Please sign in to comment.