File tree 4 files changed +77
-1
lines changed
tests/serializer-testdata
4 files changed +77
-1
lines changed Original file line number Diff line number Diff line change @@ -42,3 +42,4 @@ Patches and suggestions
42
42
- Michael[tm] Smith
43
43
- Marc Abramowitz
44
44
- Jon Dufresne
45
+ - Jonathan Vanasco
Original file line number Diff line number Diff line change 1
1
Change Log
2
2
----------
3
3
4
+ unreleased
5
+ ~~~~~~~~~~~~~~~~~~
6
+
7
+ * Added `itemscope ` as boolean attribute
8
+ https://github.com/html5lib/html5lib-python/issues/194
9
+
4
10
0.999999999/1.0b10
5
11
~~~~~~~~~~~~~~~~~~
6
12
Original file line number Diff line number Diff line change 588
588
])
589
589
590
590
booleanAttributes = {
591
- "" : frozenset (["irrelevant" ]),
591
+ "" : frozenset (["irrelevant" , "itemscope" ]),
592
592
"style" : frozenset (["scoped" ]),
593
593
"img" : frozenset (["ismap" ]),
594
594
"audio" : frozenset (["autoplay" , "controls" ]),
Original file line number Diff line number Diff line change 46
46
"quote_attr_values": "always"
47
47
}
48
48
},
49
+ {
50
+ "expected": [
51
+ "<div itemscope>"
52
+ ],
53
+ "input": [
54
+ [
55
+ "StartTag",
56
+ "http://www.w3.org/1999/xhtml",
57
+ "div",
58
+ [
59
+ {
60
+ "namespace": null,
61
+ "name": "itemscope",
62
+ "value": "itemscope"
63
+ }
64
+ ]
65
+ ]
66
+ ],
67
+ "description": "quote_attr_values='always' with itemscope",
68
+ "options": {
69
+ "quote_attr_values": "always"
70
+ }
71
+ },
49
72
{
50
73
"expected": [
51
74
"<div irrelevant>"
171
194
"use_trailing_solidus": true
172
195
}
173
196
},
197
+ {
198
+ "expected": [
199
+ "<div itemscope=itemscope>"
200
+ ],
201
+ "input": [
202
+ [
203
+ "StartTag",
204
+ "http://www.w3.org/1999/xhtml",
205
+ "div",
206
+ [
207
+ {
208
+ "namespace": null,
209
+ "name": "itemscope",
210
+ "value": "itemscope"
211
+ }
212
+ ]
213
+ ]
214
+ ],
215
+ "description": "minimize_boolean_attributes=false",
216
+ "options": {
217
+ "minimize_boolean_attributes": false
218
+ }
219
+ },
174
220
{
175
221
"expected": [
176
222
"<div irrelevant=irrelevant>"
194
240
"minimize_boolean_attributes": false
195
241
}
196
242
},
243
+ {
244
+ "expected": [
245
+ "<div itemscope=\"\">"
246
+ ],
247
+ "input": [
248
+ [
249
+ "StartTag",
250
+ "http://www.w3.org/1999/xhtml",
251
+ "div",
252
+ [
253
+ {
254
+ "namespace": null,
255
+ "name": "itemscope",
256
+ "value": ""
257
+ }
258
+ ]
259
+ ]
260
+ ],
261
+ "description": "minimize_boolean_attributes=false with empty value",
262
+ "options": {
263
+ "minimize_boolean_attributes": false
264
+ }
265
+ },
197
266
{
198
267
"expected": [
199
268
"<div irrelevant=\"\">"
You can’t perform that action at this time.
0 commit comments