From a20d09437cfd7cd021e8c4e0f6291a720165f557 Mon Sep 17 00:00:00 2001 From: Daniel Diekmeier Date: Wed, 25 Dec 2024 18:08:10 +0100 Subject: [PATCH 1/2] Don't use "lame" in documentation --- documentation/docs/03-template-syntax/07-@render.md | 2 +- documentation/docs/03-template-syntax/18-class.md | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/documentation/docs/03-template-syntax/07-@render.md b/documentation/docs/03-template-syntax/07-@render.md index ecdf5cc216fc..c5907f8dcff1 100644 --- a/documentation/docs/03-template-syntax/07-@render.md +++ b/documentation/docs/03-template-syntax/07-@render.md @@ -17,7 +17,7 @@ To render a [snippet](snippet), use a `{@render ...}` tag. The expression can be an identifier like `sum`, or an arbitrary JavaScript expression: ```svelte -{@render (cool ? coolSnippet : lameSnippet)()} +{@render (cool ? coolSnippet : boringSnippet)()} ``` ## Optional snippets diff --git a/documentation/docs/03-template-syntax/18-class.md b/documentation/docs/03-template-syntax/18-class.md index 880a34e9ec53..c1a55597d0c4 100644 --- a/documentation/docs/03-template-syntax/18-class.md +++ b/documentation/docs/03-template-syntax/18-class.md @@ -27,8 +27,8 @@ If the value is an object, the truthy keys are added: -
...
+ `class="boring"` otherwise --> +
...
``` If the value is an array, the truthy values are combined: @@ -77,14 +77,14 @@ Prior to Svelte 5.16, the `class:` directive was the most convenient way to set ```svelte -
...
-
...
+
...
+
...
``` As with other directives, we can use a shorthand when the name of the class coincides with the value: ```svelte -
...
+
...
``` > [!NOTE] Unless you're using an older version of Svelte, consider avoiding `class:`, since the attribute is more powerful and composable. From a3ce4bede3dc0cb1398f610836b8b099dfc9852d Mon Sep 17 00:00:00 2001 From: Daniel Diekmeier Date: Wed, 25 Dec 2024 18:16:45 +0100 Subject: [PATCH 2/2] Remove "dumb" as well --- packages/svelte/src/compiler/legacy.js | 2 +- .../runtime-legacy/samples/window-event-context/_config.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/svelte/src/compiler/legacy.js b/packages/svelte/src/compiler/legacy.js index e3f88c8f1d23..03b5b671993b 100644 --- a/packages/svelte/src/compiler/legacy.js +++ b/packages/svelte/src/compiler/legacy.js @@ -591,7 +591,7 @@ export function convert(source, ast) { Text(node, { path }) { const parent = path.at(-1); if (parent?.type === 'RegularElement' && parent.name === 'style') { - // these text nodes are missing `raw` for some dumb reason + // these text nodes are missing `raw` for some reason return /** @type {AST.Text} */ ({ type: 'Text', start: node.start, diff --git a/packages/svelte/tests/runtime-legacy/samples/window-event-context/_config.js b/packages/svelte/tests/runtime-legacy/samples/window-event-context/_config.js index 775ea17bbb8b..6e3901f62eea 100644 --- a/packages/svelte/tests/runtime-legacy/samples/window-event-context/_config.js +++ b/packages/svelte/tests/runtime-legacy/samples/window-event-context/_config.js @@ -8,7 +8,7 @@ export default test({ html: 'true', - skip: /^v4/.test(process.version), // node 4 apparently does some dumb stuff + skip: /^v4/.test(process.version), // node 4 apparently does some weird stuff async test({ assert, component, target, window }) { const event = new window.Event('click');