From dae07293d4120e7928e0105cab2ef079e0da9520 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Mon, 23 Feb 2026 21:58:56 -0500 Subject: [PATCH] regenerate --- .../98-reference/.generated/compile-errors.md | 36 ++++++++++++++++++- packages/svelte/src/compiler/errors.js | 4 +-- 2 files changed, 37 insertions(+), 3 deletions(-) diff --git a/documentation/docs/98-reference/.generated/compile-errors.md b/documentation/docs/98-reference/.generated/compile-errors.md index 079b1d2a0a..7fc9f56cd1 100644 --- a/documentation/docs/98-reference/.generated/compile-errors.md +++ b/documentation/docs/98-reference/.generated/compile-errors.md @@ -63,7 +63,41 @@ Event attribute must be a JavaScript expression, not a string ### attribute_invalid_sequence_expression ``` -Sequence expressions are not allowed as attribute/directive values in runes mode, unless wrapped in parentheses +Comma-separated expressions are not allowed as attribute/directive values in runes mode, unless wrapped in parentheses +``` + +``` +An attribute value cannot be a comma-separated sequence of expressions — in other words this is disallowed: +``` + +``` +```svelte +
...
+``` +``` + +``` +Instead, make sure that the attribute value contains a single expression. In the example above it's likely that this was intended (see the [class documentation](class) for more details): +``` + +``` +```svelte +
...
+``` +``` + +``` +If you _do_ need to use the comma operator for some reason, wrap the sequence in parentheses: +``` + +``` +```svelte +
...
+``` +``` + +``` +[!NOTE] This will evaluate to `color`, ignoring `size`. ``` ### attribute_invalid_type diff --git a/packages/svelte/src/compiler/errors.js b/packages/svelte/src/compiler/errors.js index 3997dbec32..ee2e759779 100644 --- a/packages/svelte/src/compiler/errors.js +++ b/packages/svelte/src/compiler/errors.js @@ -785,12 +785,12 @@ export function attribute_invalid_name(node, name) { } /** - * Sequence expressions are not allowed as attribute/directive values in runes mode, unless wrapped in parentheses + * [!NOTE] This will evaluate to `color`, ignoring `size`. * @param {null | number | NodeLike} node * @returns {never} */ export function attribute_invalid_sequence_expression(node) { - e(node, 'attribute_invalid_sequence_expression', `Sequence expressions are not allowed as attribute/directive values in runes mode, unless wrapped in parentheses\nhttps://svelte.dev/e/attribute_invalid_sequence_expression`); + e(node, 'attribute_invalid_sequence_expression', `[!NOTE] This will evaluate to \`color\`, ignoring \`size\`.\nhttps://svelte.dev/e/attribute_invalid_sequence_expression`); } /**