diff --git a/documentation/docs/03-runes/02-side-effects.md b/documentation/docs/03-runes/02-side-effects.md index 583d3c9bfa5d..c9bda9a1e632 100644 --- a/documentation/docs/03-runes/02-side-effects.md +++ b/documentation/docs/03-runes/02-side-effects.md @@ -164,7 +164,7 @@ In general, `$effect` is best considered something of an escape hatch — useful ``` -> [!NOTE] For things that are more complicated than a simple expression like `count * 2`, you can also use [`$derived.by`](#$derived-by). +> [!NOTE] For things that are more complicated than a simple expression like `count * 2`, you can also use `$derived.by`. You might be tempted to do something convoluted with effects to link one value to another. The following example shows two inputs for "money spent" and "money left" that are connected to each other. If you update one, the other should update accordingly. Don't use effects for this ([demo](/#H4sIAAAAAAAACpVRy2rDMBD8lWXJwYE0dg-9KFYg31H3oNirIJBlYa1DjPG_F8l1XEop9LgzOzP7mFAbSwHF-4ROtYQCL97jAXn0sQh3skx4wNANfR2RMtS98XyuXMWWGLhjZUHCa1GcVix4cgwSdoEVU1bsn4wl_Y1I2kS6inekNdWcZXuQZ5giFDWpfwl5WYyT2fynbB1g1UWbTVbm2w6utOpKNq1TGucHhri6rLBX7kYVwtW4RtyVHUhOyXeGVj3klLxnyJP0i8lXNJUx6en-v6A48K85kTimpi0sYj-yAo-Wlh9FcL1LY4K3ahSgLT1OC3ZTXkBxfKN2uVC6T5LjAduuMdpQg4L7geaP-RNHPuClMQIAAA==)): @@ -289,7 +289,7 @@ In rare cases, you may need to run code _before_ the DOM updates. For this we ca ``` -Apart from the timing, `$effect.pre` works exactly like [`$effect`](#$effect) — refer to its documentation for more info. +Apart from the timing, `$effect.pre` works exactly like `$effect` — refer to its documentation for more info. ## `$effect.tracking` diff --git a/documentation/docs/04-runtime/04-imperative-component-api.md b/documentation/docs/04-runtime/04-imperative-component-api.md index b4517bd34f93..a124a86ba4d1 100644 --- a/documentation/docs/04-runtime/04-imperative-component-api.md +++ b/documentation/docs/04-runtime/04-imperative-component-api.md @@ -64,7 +64,7 @@ result.head; // HTML for somewhere in this tag ## `hydrate` -Like `mount`, but will reuse up any HTML rendered by Svelte's SSR output (from the [`render`](#server-render) function) inside the target and make it interactive: +Like `mount`, but will reuse up any HTML rendered by Svelte's SSR output (from the [`render`](#render) function) inside the target and make it interactive: ```js // @errors: 2322 diff --git a/documentation/docs/05-misc/04-custom-elements.md b/documentation/docs/05-misc/04-custom-elements.md index d2a75e25cb11..39659f1950b5 100644 --- a/documentation/docs/05-misc/04-custom-elements.md +++ b/documentation/docs/05-misc/04-custom-elements.md @@ -4,7 +4,7 @@ title: Custom elements - [basically what we have today](https://svelte.dev/docs/custom-elements-api) -Svelte components can also be compiled to custom elements (aka web components) using the `customElement: true` compiler option. You should specify a tag name for the component using the `` [element](special-elements#svelte-options). +Svelte components can also be compiled to custom elements (aka web components) using the `customElement: true` compiler option. You should specify a tag name for the component using the `` [element](special-elements#svelte:options). ```svelte @@ -36,7 +36,7 @@ document.body.innerHTML = ` `; ``` -Any [props](basic-markup#attributes-and-props) are exposed as properties of the DOM element (as well as being readable/writable as attributes, where possible). +Any [props](basic-markup#Attributes-and-props) are exposed as properties of the DOM element (as well as being readable/writable as attributes, where possible). ```js // @noErrors diff --git a/packages/svelte/src/compiler/preprocess/index.js b/packages/svelte/src/compiler/preprocess/index.js index f26db16e2bf7..afef898471c6 100644 --- a/packages/svelte/src/compiler/preprocess/index.js +++ b/packages/svelte/src/compiler/preprocess/index.js @@ -328,7 +328,7 @@ async function process_markup(process, source) { /** * The preprocess function provides convenient hooks for arbitrarily transforming component source code. - * For example, it can be used to convert a