Skip to content

Commit 04ac126

Browse files
authored
Update parser for empty attr value (#73)
1 parent b201494 commit 04ac126

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/parser/converts/attr.ts

+5
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,11 @@ function convertAttribute(
131131
return sAttr
132132
}
133133
if (v.type === "Text") {
134+
if (v.start === v.end) {
135+
// Empty
136+
// https://github.com/sveltejs/svelte/pull/6539
137+
continue
138+
}
134139
const next = node.value[index + 1]
135140
if (next && next.start < v.end) {
136141
// Maybe bug in Svelte can cause the completion index to shift.

0 commit comments

Comments
 (0)