Skip to content

Commit 4404dba

Browse files
committed
put everything part of a set on its own line so we know what's being changed when someone adds or removes an "element"
--HG-- extra : convert_revision : svn%3Aacbfec75-9323-0410-a652-858a13e371e0/trunk%4084
1 parent 96e699a commit 4404dba

1 file changed

Lines changed: 117 additions & 20 deletions

File tree

constants.py

Lines changed: 117 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -10,31 +10,128 @@
1010
"PLAINTEXT":3
1111
}
1212

13-
scopingElements = frozenset(("button", "caption", "html", "marquee", "object",
14-
"table", "td", "th"))
13+
scopingElements = frozenset((
14+
"button",
15+
"caption",
16+
"html",
17+
"marquee",
18+
"object",
19+
"table",
20+
"td",
21+
"th"
22+
))
1523

16-
formattingElements = frozenset(("a", "b", "big", "em", "font", "i", "nobr",
17-
"s", "small", "strike", "strong", "tt", "u"))
24+
formattingElements = frozenset((
25+
"a",
26+
"b",
27+
"big",
28+
"em",
29+
"font",
30+
"i",
31+
"nobr",
32+
"s",
33+
"small",
34+
"strike",
35+
"strong",
36+
"tt",
37+
"u"
38+
))
1839

19-
specialElements = frozenset(("address", "area", "base", "basefont", "bgsound",
20-
"blockquote", "body", "br", "center", "col",
21-
"colgroup", "dd", "dir", "div", "dl", "dt",
22-
"embed", "fieldset", "form", "frame", "frameset",
23-
"h1", "h2", "h3", "h4", "h5", "h6", "head", "hr",
24-
"iframe", "image", "img", "input", "isindex", "li",
25-
"link", "listing", "menu", "meta", "noembed",
26-
"noframes", "noscript", "ol", "optgroup", "option",
27-
"p", "param", "plaintext", "pre", "script",
28-
"select", "spacer", "style", "tbody", "textarea",
29-
"tfoot", "thead", "title", "tr", "ul", "wbr"))
40+
specialElements = frozenset((
41+
"address",
42+
"area",
43+
"base",
44+
"basefont",
45+
"bgsound",
46+
"blockquote",
47+
"body",
48+
"br",
49+
"center",
50+
"col",
51+
"colgroup",
52+
"dd",
53+
"dir",
54+
"div",
55+
"dl",
56+
"dt",
57+
"embed",
58+
"fieldset",
59+
"form",
60+
"frame",
61+
"frameset",
62+
"h1",
63+
"h2",
64+
"h3",
65+
"h4",
66+
"h5",
67+
"h6",
68+
"head",
69+
"hr",
70+
"iframe",
71+
"image",
72+
"img",
73+
"input",
74+
"isindex",
75+
"li",
76+
"link",
77+
"listing",
78+
"menu",
79+
"meta",
80+
"noembed",
81+
"noframes",
82+
"noscript",
83+
"ol",
84+
"optgroup",
85+
"option",
86+
"p",
87+
"param",
88+
"plaintext",
89+
"pre",
90+
"script",
91+
"select",
92+
"spacer",
93+
"style",
94+
"tbody",
95+
"textarea",
96+
"tfoot",
97+
"thead",
98+
"title",
99+
"tr",
100+
"ul",
101+
"wbr"
102+
))
30103

31-
spaceCharacters = frozenset((u"\t", u"\n", u"\u000B", u"\u000C", u" "))
104+
spaceCharacters = frozenset((
105+
u"\t",
106+
u"\n",
107+
u"\u000B",
108+
u"\u000C",
109+
u" "
110+
))
32111

33-
headingElements = frozenset(("h1", "h2", "h3", "h4", "h5", "h6"))
112+
headingElements = frozenset((
113+
"h1",
114+
"h2",
115+
"h3",
116+
"h4",
117+
"h5",
118+
"h6"
119+
))
34120

35-
#What about event-source and command?
36-
voidElements = frozenset(("base", "link", "meta", "hr", "br", "img", "embed",
37-
"param", "area", "col", "input"))
121+
# XXX What about event-source and command?
122+
voidElements = frozenset((
123+
"base",
124+
"link",
125+
"meta",
126+
"hr",
127+
"br",
128+
"img",
129+
"embed",
130+
"param",
131+
"area",
132+
"col",
133+
"input"
134+
))
38135

39136
entitiesWindows1252 = {
40137
128: 8364, # 0x80 0x20AC EURO SIGN

0 commit comments

Comments
 (0)