Skip to content

Commit 1961940

Browse files
committed
fix: resolve formatting issues
1 parent a8e585d commit 1961940

File tree

5 files changed

+19
-15
lines changed

5 files changed

+19
-15
lines changed

documentation/docs/98-reference/.generated/compile-errors.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -400,12 +400,6 @@ Expected token %token%
400400
Expected whitespace
401401
```
402402

403-
### unterminated_string_constant
404-
405-
```
406-
Unterminated string constant
407-
```
408-
409403
### export_undefined
410404

411405
```
@@ -994,6 +988,12 @@ Unexpected end of input
994988
'%word%' is a reserved word in JavaScript and cannot be used here
995989
```
996990

991+
### unterminated_string_constant
992+
993+
```
994+
Unterminated string constant
995+
```
996+
997997
### void_element_invalid_content
998998

999999
```

packages/svelte/messages/compile-errors/template.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -172,10 +172,6 @@
172172

173173
> Expected whitespace
174174
175-
## unterminated_string_constant
176-
177-
> Unterminated string constant
178-
179175
## illegal_element_attribute
180176

181177
> `<%name%>` does not support non-event attributes or spread attributes
@@ -414,6 +410,10 @@ See https://html.spec.whatwg.org/multipage/custom-elements.html#valid-custom-ele
414410

415411
> '%word%' is a reserved word in JavaScript and cannot be used here
416412
413+
## unterminated_string_constant
414+
415+
> Unterminated string constant
416+
417417
## void_element_invalid_content
418418

419419
> Void elements cannot have children or closing tags

packages/svelte/src/compiler/errors.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1553,4 +1553,4 @@ export function unexpected_reserved_word(node, word) {
15531553
*/
15541554
export function void_element_invalid_content(node) {
15551555
e(node, "void_element_invalid_content", "Void elements cannot have children or closing tags");
1556-
}
1556+
}

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

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,10 @@ function read_expression_length(parser, start) {
102102
} else if (is_bracket_close(code)) {
103103
const popped = /** @type {number} */ (bracket_stack.pop());
104104
if (!is_bracket_pair(popped, code)) {
105-
e.expected_token(i, String.fromCharCode(/** @type {number} */(get_bracket_close(popped))));
105+
e.expected_token(
106+
i,
107+
String.fromCharCode(/** @type {number} */ (get_bracket_close(popped)))
108+
);
106109
}
107110
if (bracket_stack.length === 0) {
108111
i += code <= 0xffff ? 1 : 2;
@@ -145,10 +148,11 @@ function read_string_length(parser, start, quote) {
145148
if (
146149
i < parser.template.length - 1 &&
147150
is_back_quote(quote) &&
148-
code === DOLAR && full_char_code_at(parser.template, i + 1) === LEFT_BRACKET
151+
code === DOLAR &&
152+
full_char_code_at(parser.template, i + 1) === LEFT_BRACKET
149153
) {
150154
i++;
151-
i = read_expression_length(parser, i)
155+
i = read_expression_length(parser, i);
152156
} else {
153157
i += code <= 0xffff ? 1 : 2;
154158
}

packages/svelte/src/compiler/phases/1-parse/utils/quote.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const SINGLE_QUOTE = '\''.charCodeAt(0);
1+
const SINGLE_QUOTE = "'".charCodeAt(0);
22
const DOUBLE_QUOTE = '"'.charCodeAt(0);
33
const BACK_QUOTE = '`'.charCodeAt(0);
44

0 commit comments

Comments
 (0)