Skip to content

Commit 386af3b

Browse files
authored
Add missing HTML5 elements (#655)
* 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. * Add some missing HTML5 elements Source: https://developer.mozilla.org/en-US/docs/Web/HTML New, non experimental, non deprecated elements: - <bdi> - <data> - <dialog> - <picture> - <rp> - <rt> - <ruby> - <search> - <slot> - <template> - <u> Close #654
1 parent 0405ce9 commit 386af3b

File tree

2 files changed

+123
-11
lines changed

2 files changed

+123
-11
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## unreleased [](https://github.com/activeadmin/arbre/compare/v2.1.0...master)
4+
5+
* Add some missing HTML5 elements [#655][] by [@tagliala][]
6+
37
## 2.1.0 [](https://github.com/activeadmin/arbre/compare/v2.0.2...v2.1.0)
48

59
* Add support for ViewComponent. [#644][] by [@budu][]
@@ -154,6 +158,7 @@ Initial release and extraction from Active Admin
154158
[#617]: https://github.com/activeadmin/arbre/pull/617
155159
[#622]: https://github.com/activeadmin/arbre/pull/622
156160
[#644]: https://github.com/activeadmin/arbre/pull/644
161+
[#655]: https://github.com/activeadmin/arbre/pull/655
157162

158163
[@aramvisser]: https://github.com/aramvisser
159164
[@LTe]: https://github.com/LTe

lib/arbre/html/html5_elements.rb

Lines changed: 118 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,124 @@
22
module Arbre
33
module HTML
44

5-
AUTO_BUILD_ELEMENTS = [ :a, :abbr, :address, :area, :article, :aside, :audio, :b, :base,
6-
:bdo, :blockquote, :body, :br, :button, :canvas, :caption, :cite,
7-
:code, :col, :colgroup, :command, :datalist, :dd, :del, :details,
8-
:dfn, :div, :dl, :dt, :em, :embed, :fieldset, :figcaption, :figure,
9-
:footer, :form, :h1, :h2, :h3, :h4, :h5, :h6, :head, :header, :hgroup,
10-
:hr, :html, :i, :iframe, :img, :input, :ins, :keygen, :kbd, :label,
11-
:legend, :li, :link, :main, :map, :mark, :menu, :menuitem, :meta, :meter, :nav, :noscript,
12-
:object, :ol, :optgroup, :option, :output, :param, :pre, :progress, :q,
13-
:s, :samp, :script, :section, :select, :small, :source, :span,
14-
:strong, :style, :sub, :summary, :sup, :svg, :table, :tbody, :td,
15-
:textarea, :tfoot, :th, :thead, :time, :title, :tr, :track, :ul, :var, :video, :wbr ]
5+
AUTO_BUILD_ELEMENTS = [
6+
:a,
7+
:abbr,
8+
:address,
9+
:area,
10+
:article,
11+
:aside,
12+
:audio,
13+
:b,
14+
:base,
15+
:bdi,
16+
:bdo,
17+
:blockquote,
18+
:body,
19+
:br,
20+
:button,
21+
:canvas,
22+
:caption,
23+
:cite,
24+
:code,
25+
:col,
26+
:colgroup,
27+
:command,
28+
:data,
29+
:datalist,
30+
:dd,
31+
:del,
32+
:details,
33+
:dfn,
34+
:dialog,
35+
:div,
36+
:dl,
37+
:dt,
38+
:em,
39+
:embed,
40+
:fieldset,
41+
:figcaption,
42+
:figure,
43+
:footer,
44+
:form,
45+
:h1,
46+
:h2,
47+
:h3,
48+
:h4,
49+
:h5,
50+
:h6,
51+
:head,
52+
:header,
53+
:hgroup,
54+
:hr,
55+
:html,
56+
:i,
57+
:iframe,
58+
:img,
59+
:input,
60+
:ins,
61+
:kbd,
62+
:keygen,
63+
:label,
64+
:legend,
65+
:li,
66+
:link,
67+
:main,
68+
:map,
69+
:mark,
70+
:menu,
71+
:menuitem,
72+
:meta,
73+
:meter,
74+
:nav,
75+
:noscript,
76+
:object,
77+
:ol,
78+
:optgroup,
79+
:option,
80+
:output,
81+
:param,
82+
:picture,
83+
:pre,
84+
:progress,
85+
:q,
86+
:rp,
87+
:rt,
88+
:ruby,
89+
:s,
90+
:samp,
91+
:script,
92+
:search,
93+
:section,
94+
:select,
95+
:slot,
96+
:small,
97+
:source,
98+
:span,
99+
:strong,
100+
:style,
101+
:sub,
102+
:summary,
103+
:sup,
104+
:svg,
105+
:table,
106+
:tbody,
107+
:td,
108+
:template,
109+
:textarea,
110+
:tfoot,
111+
:th,
112+
:thead,
113+
:time,
114+
:title,
115+
:tr,
116+
:track,
117+
:u,
118+
:ul,
119+
:var,
120+
:video,
121+
:wbr
122+
]
16123

17124
HTML5_ELEMENTS = [ :p ] + AUTO_BUILD_ELEMENTS
18125

0 commit comments

Comments
 (0)