test: add sample for unquoted attributes

pull/14615/head
Yang Pan 2 years ago
parent 7f5172745d
commit b01cac954e

@ -1 +1,2 @@
<div class=foo></div> <div class=foo></div>
<a href=/>home</a>

@ -2,7 +2,7 @@
"html": { "html": {
"type": "Fragment", "type": "Fragment",
"start": 0, "start": 0,
"end": 21, "end": 40,
"children": [ "children": [
{ {
"type": "Element", "type": "Element",
@ -27,6 +27,45 @@
} }
], ],
"children": [] "children": []
},
{
"type": "Text",
"start": 21,
"end": 22,
"raw": "\n",
"data": "\n"
},
{
"type": "Element",
"start": 22,
"end": 40,
"name": "a",
"attributes": [
{
"type": "Attribute",
"start": 25,
"end": 31,
"name": "href",
"value": [
{
"start": 30,
"end": 31,
"type": "Text",
"raw": "/",
"data": "/"
}
]
}
],
"children": [
{
"type": "Text",
"start": 32,
"end": 36,
"raw": "home",
"data": "home"
}
]
} }
] ]
} }

Loading…
Cancel
Save