allow multiple attributes

pull/31/head
Rich-Harris 8 years ago
parent 3ef3229075
commit 4a32e59f2e

@ -62,6 +62,7 @@ export default function tag ( parser ) {
let attribute;
while ( attribute = readAttribute( parser ) ) {
attributes.push( attribute );
parser.allowWhitespace();
}
parser.allowWhitespace();

@ -0,0 +1 @@
<div id='x' class='y'></div>

@ -0,0 +1,48 @@
{
"html": {
"start": 0,
"end": 28,
"type": "Fragment",
"children": [
{
"start": 0,
"end": 28,
"type": "Element",
"name": "div",
"attributes": [
{
"start": 5,
"end": 11,
"type": "Attribute",
"name": "id",
"value": [
{
"start": 9,
"end": 10,
"type": "Text",
"data": "x"
}
]
},
{
"start": 12,
"end": 21,
"type": "Attribute",
"name": "class",
"value": [
{
"start": 19,
"end": 20,
"type": "Text",
"data": "y"
}
]
}
],
"children": []
}
]
},
"css": null,
"js": null
}
Loading…
Cancel
Save