46 lines
1.4 KiB
Plaintext
46 lines
1.4 KiB
Plaintext
|
{"tests":[
|
||
|
|
||
|
{"description": "quote_char=\"'\"",
|
||
|
"options": {"quote_char": "'"},
|
||
|
"input": [["StartTag", "span", {"title": "test 'with' quote_char"}]],
|
||
|
"expected": ["<span title='test 'with' quote_char'>"]
|
||
|
},
|
||
|
|
||
|
{"description": "quote_attr_values=true",
|
||
|
"options": {"quote_attr_values": true},
|
||
|
"input": [["StartTag", "button", {"disabled": "disabled"}]],
|
||
|
"expected": ["<button disabled>"]
|
||
|
},
|
||
|
|
||
|
{"description": "quote_attr_values=true with irrelevant",
|
||
|
"options": {"quote_attr_values": true},
|
||
|
"input": [["StartTag", "div", {"irrelevant": "irrelevant"}]],
|
||
|
"expected": ["<div irrelevant>"]
|
||
|
},
|
||
|
|
||
|
{"description": "use_trailing_solidus=true with void element",
|
||
|
"options": {"use_trailing_solidus": true},
|
||
|
"input": [["EmptyTag", "img", {}]],
|
||
|
"expected": ["<img />"]
|
||
|
},
|
||
|
|
||
|
{"description": "use_trailing_solidus=true with non-void element",
|
||
|
"options": {"use_trailing_solidus": true},
|
||
|
"input": [["StartTag", "div", {}]],
|
||
|
"expected": ["<div>"]
|
||
|
},
|
||
|
|
||
|
{"description": "minimize_boolean_attributes=false",
|
||
|
"options": {"minimize_boolean_attributes": false},
|
||
|
"input": [["StartTag", "div", {"irrelevant": "irrelevant"}]],
|
||
|
"expected": ["<div irrelevant=irrelevant>"]
|
||
|
},
|
||
|
|
||
|
{"description": "minimize_boolean_attributes=false with empty value",
|
||
|
"options": {"minimize_boolean_attributes": false},
|
||
|
"input": [["StartTag", "div", {"irrelevant": ""}]],
|
||
|
"expected": ["<div irrelevant=\"\">"]
|
||
|
}
|
||
|
|
||
|
]}
|