diff --git a/src/compiler/parse/state/tag.ts b/src/compiler/parse/state/tag.ts index a936ab3bd4..9071e66032 100644 --- a/src/compiler/parse/state/tag.ts +++ b/src/compiler/parse/state/tag.ts @@ -333,7 +333,7 @@ function read_attribute(parser: Parser, unique_names: Set) { if (name === null) { parser.error({ code: 'empty-attribute-value', - message: 'Empty attribute shorthand' + message: 'Attribute shorthand cannot be empty' }, start); } diff --git a/test/parser/samples/error-empty-attribute-shorthand/error.json b/test/parser/samples/error-empty-attribute-shorthand/error.json new file mode 100644 index 0000000000..093e581edc --- /dev/null +++ b/test/parser/samples/error-empty-attribute-shorthand/error.json @@ -0,0 +1,10 @@ +{ + "code": "empty-attribute-value", + "message": "Attribute shorthand cannot be empty", + "start": { + "line": 1, + "column": 6, + "character": 6 + }, + "pos": 6 +} \ No newline at end of file diff --git a/test/parser/samples/error-empty-attribute-shorthand/input.svelte b/test/parser/samples/error-empty-attribute-shorthand/input.svelte new file mode 100644 index 0000000000..2e137c8c6d --- /dev/null +++ b/test/parser/samples/error-empty-attribute-shorthand/input.svelte @@ -0,0 +1 @@ + \ No newline at end of file