Skip to content

Commit 863232e

Browse files
committed
test: add additional sample for unquoted href attributes
1 parent 8941b77 commit 863232e

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,2 +1,3 @@
11
<div class=foo></div>
2-
<a href=/>home</a>
2+
<a href=/>home</a>
3+
<a href=/foo>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": 40,
5+
"end": 62,
66
"children": [
77
{
88
"type": "Element",
@@ -66,6 +66,45 @@
6666
"data": "home"
6767
}
6868
]
69+
},
70+
{
71+
"type": "Text",
72+
"start": 40,
73+
"end": 41,
74+
"raw": "\n",
75+
"data": "\n"
76+
},
77+
{
78+
"type": "Element",
79+
"start": 41,
80+
"end": 62,
81+
"name": "a",
82+
"attributes": [
83+
{
84+
"type": "Attribute",
85+
"start": 44,
86+
"end": 53,
87+
"name": "href",
88+
"value": [
89+
{
90+
"start": 49,
91+
"end": 53,
92+
"type": "Text",
93+
"raw": "/foo",
94+
"data": "/foo"
95+
}
96+
]
97+
}
98+
],
99+
"children": [
100+
{
101+
"type": "Text",
102+
"start": 54,
103+
"end": 58,
104+
"raw": "home",
105+
"data": "home"
106+
}
107+
]
69108
}
70109
]
71110
}

0 commit comments

Comments
 (0)