File tree Expand file tree Collapse file tree 4 files changed +77
-1
lines changed
tests/serializer-testdata Expand file tree Collapse file tree 4 files changed +77
-1
lines changed Original file line number Diff line number Diff line change @@ -42,3 +42,4 @@ Patches and suggestions
4242- Michael[tm] Smith
4343- Marc Abramowitz
4444- Jon Dufresne
45+ - Jonathan Vanasco
Original file line number Diff line number Diff line change 11Change Log
22----------
33
4+ unreleased
5+ ~~~~~~~~~~~~~~~~~~
6+
7+ * Added `itemscope ` as boolean attribute
8+ https://github.com/html5lib/html5lib-python/issues/194
9+
4100.999999999/1.0b10
511~~~~~~~~~~~~~~~~~~
612
Original file line number Diff line number Diff line change 588588])
589589
590590booleanAttributes = {
591- "" : frozenset (["irrelevant" ]),
591+ "" : frozenset (["irrelevant" , "itemscope" ]),
592592 "style" : frozenset (["scoped" ]),
593593 "img" : frozenset (["ismap" ]),
594594 "audio" : frozenset (["autoplay" , "controls" ]),
Original file line number Diff line number Diff line change 4646 "quote_attr_values": "always"
4747 }
4848 },
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+ },
4972 {
5073 "expected": [
5174 "<div irrelevant>"
171194 "use_trailing_solidus": true
172195 }
173196 },
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+ },
174220 {
175221 "expected": [
176222 "<div irrelevant=irrelevant>"
194240 "minimize_boolean_attributes": false
195241 }
196242 },
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+ },
197266 {
198267 "expected": [
199268 "<div irrelevant=\"\">"
You can’t perform that action at this time.
0 commit comments