Skip to content

Commit 463c8f7

Browse files
committed
tweak
1 parent fe9d595 commit 463c8f7

File tree

1 file changed

+7
-4
lines changed
  • packages/svelte/src/compiler/phases/1-parse/read

1 file changed

+7
-4
lines changed

packages/svelte/src/compiler/phases/1-parse/read/context.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,14 +119,17 @@ function match_quote(parser, start, quote) {
119119
while (i < parser.template.length) {
120120
const char = parser.template[i++];
121121

122-
if (!is_escaped && char === quote) {
122+
if (is_escaped) {
123+
is_escaped = false;
124+
continue;
125+
}
126+
127+
if (char === quote) {
123128
return i;
124129
}
125130

126-
if (!is_escaped && char === '\\') {
131+
if (char === '\\') {
127132
is_escaped = true;
128-
} else if (is_escaped) {
129-
is_escaped = false;
130133
}
131134

132135
if (quote === '`' && char === '$' && parser.template[i] === '{') {

0 commit comments

Comments
 (0)