Skip to content
This repository was archived by the owner on Jun 4, 2024. It is now read-only.

Commit 2f873da

Browse files
committed
ensure element list is unique
1 parent 173510e commit 2f873da

File tree

2 files changed

+102
-107
lines changed

2 files changed

+102
-107
lines changed

scripts/data/elements.txt

+94-106
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,94 @@
1-
link
2-
meta
3-
title
1+
a
2+
abbr
3+
acronym
44
address
5+
area
56
article
67
aside
8+
audio
9+
b
10+
base
11+
basefont
12+
bdi
13+
bdo
14+
big
15+
blink
16+
blockquote
17+
br
18+
button
19+
canvas
20+
caption
21+
center
22+
cite
23+
code
24+
col
25+
colgroup
26+
command
27+
content
28+
data
29+
datalist
30+
dd
31+
del
32+
details
33+
dfn
34+
dialog
35+
div
36+
dl
37+
dt
38+
element
39+
em
40+
embed
41+
fieldset
42+
figcaption
43+
figure
44+
font
745
footer
8-
header
46+
form
47+
frame
48+
frameset
949
h1
1050
h2
1151
h3
1252
h4
1353
h5
1454
h6
55+
header
1556
hgroup
16-
main
17-
nav
18-
section
19-
blockquote
20-
dd
21-
div
22-
dl
23-
dt
24-
figcaption
25-
figure
2657
hr
58+
i
59+
iframe
60+
img
61+
ins
62+
isindex
63+
kbd
64+
keygen
65+
label
66+
legend
2767
li
68+
link
69+
listing
2870
main
71+
map
72+
mark
73+
marquee
74+
meta
75+
meter
76+
multicol
77+
nav
78+
nextid
79+
nobr
80+
noscript
81+
object
2982
ol
83+
optgroup
84+
option
85+
output
3086
p
87+
param
88+
picture
89+
plaintext
3190
pre
32-
ul
33-
a
34-
abbr
35-
b
36-
bdi
37-
bdo
38-
br
39-
cite
40-
code
41-
data
42-
dfn
43-
em
44-
i
45-
kbd
46-
mark
91+
progress
4792
q
4893
rb
4994
rp
@@ -52,92 +97,35 @@ rtc
5297
ruby
5398
s
5499
samp
100+
script
101+
section
102+
select
103+
shadow
104+
slot
55105
small
106+
source
107+
spacer
56108
span
109+
strike
57110
strong
58111
sub
112+
summary
59113
sup
60-
time
61-
u
62-
var
63-
wbr
64-
area
65-
audio
66-
img
67-
map
68-
track
69-
video
70-
embed
71-
iframe
72-
object
73-
param
74-
picture
75-
source
76-
canvas
77-
noscript
78-
script
79-
del
80-
ins
81-
caption
82-
col
83-
colgroup
84114
table
85115
tbody
86116
td
117+
template
118+
textarea
87119
tfoot
88120
th
89121
thead
122+
time
123+
title
90124
tr
91-
button
92-
datalist
93-
fieldset
94-
form
95-
label
96-
legend
97-
meter
98-
optgroup
99-
option
100-
output
101-
progress
102-
select
103-
textarea
104-
details
105-
dialog
106-
summary
107-
content
108-
element
109-
shadow
110-
slot
111-
template
112-
acronym
113-
basefont
114-
big
115-
blink
116-
center
117-
command
118-
content
119-
element
120-
font
121-
frame
122-
frameset
123-
isindex
124-
keygen
125-
listing
126-
marquee
127-
multicol
128-
nextid
129-
nobr
130-
plaintext
131-
shadow
132-
spacer
133-
strike
134-
xmp
135-
base
136-
section
137-
h1
138-
h2
139-
h3
140-
h4
141-
h5
142-
h6
143-
iframe
125+
track
126+
u
127+
ul
128+
var
129+
video
130+
wbr
131+
xmp

scripts/extract-elements.js

+8-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,14 @@ function extractElements($) {
4040
return list.concat(subList);
4141
}, [])
4242
.filter(element => excludeElements.indexOf(element) === -1)
43-
.concat(addElements);
43+
.concat(addElements)
44+
.sort()
45+
.reduce((list, element) => {
46+
if(!list.length || element !== list[list.length - 1]) {
47+
list.push(element);
48+
}
49+
return list;
50+
}, []);
4451
}
4552

4653
request(refUrl, (error, response, html) => {

0 commit comments

Comments
 (0)