Skip to content

Commit b01cac9

Browse files
committed
test: add sample for unquoted attributes
1 parent 7f51727 commit b01cac9

File tree

2 files changed

+42
-2
lines changed

2 files changed

+42
-2
lines changed
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
<div class=foo></div>
1+
<div class=foo></div>
2+
<a href=/>home</a>

packages/svelte/tests/parser-legacy/samples/attribute-unquoted/output.json

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"html": {
33
"type": "Fragment",
44
"start": 0,
5-
"end": 21,
5+
"end": 40,
66
"children": [
77
{
88
"type": "Element",
@@ -27,6 +27,45 @@
2727
}
2828
],
2929
"children": []
30+
},
31+
{
32+
"type": "Text",
33+
"start": 21,
34+
"end": 22,
35+
"raw": "\n",
36+
"data": "\n"
37+
},
38+
{
39+
"type": "Element",
40+
"start": 22,
41+
"end": 40,
42+
"name": "a",
43+
"attributes": [
44+
{
45+
"type": "Attribute",
46+
"start": 25,
47+
"end": 31,
48+
"name": "href",
49+
"value": [
50+
{
51+
"start": 30,
52+
"end": 31,
53+
"type": "Text",
54+
"raw": "/",
55+
"data": "/"
56+
}
57+
]
58+
}
59+
],
60+
"children": [
61+
{
62+
"type": "Text",
63+
"start": 32,
64+
"end": 36,
65+
"raw": "home",
66+
"data": "home"
67+
}
68+
]
3069
}
3170
]
3271
}

0 commit comments

Comments
 (0)