Skip to content

Commit caaf74b

Browse files
authored
docs: more fixes (#13608)
1 parent 81f28cc commit caaf74b

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

documentation/docs/03-runes/02-side-effects.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ In general, `$effect` is best considered something of an escape hatch — useful
164164
</script>
165165
```
166166

167-
> [!NOTE] For things that are more complicated than a simple expression like `count * 2`, you can also use [`$derived.by`](#$derived-by).
167+
> [!NOTE] For things that are more complicated than a simple expression like `count * 2`, you can also use `$derived.by`.
168168
169169
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==)):
170170

@@ -289,7 +289,7 @@ In rare cases, you may need to run code _before_ the DOM updates. For this we ca
289289
</div>
290290
```
291291

292-
Apart from the timing, `$effect.pre` works exactly like [`$effect`](#$effect) — refer to its documentation for more info.
292+
Apart from the timing, `$effect.pre` works exactly like `$effect` — refer to its documentation for more info.
293293

294294
## `$effect.tracking`
295295

documentation/docs/04-runtime/04-imperative-component-api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ result.head; // HTML for somewhere in this <head> tag
6464

6565
## `hydrate`
6666

67-
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:
67+
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:
6868

6969
```js
7070
// @errors: 2322

documentation/docs/05-misc/04-custom-elements.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: Custom elements
44

55
- [basically what we have today](https://svelte.dev/docs/custom-elements-api)
66

7-
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 `<svelte:options>` [element](special-elements#svelte-options).
7+
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 `<svelte:options>` [element](special-elements#svelte:options).
88

99
```svelte
1010
<svelte:options customElement="my-element" />
@@ -36,7 +36,7 @@ document.body.innerHTML = `
3636
`;
3737
```
3838

39-
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).
39+
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).
4040

4141
```js
4242
// @noErrors

packages/svelte/src/compiler/preprocess/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ async function process_markup(process, source) {
328328

329329
/**
330330
* The preprocess function provides convenient hooks for arbitrarily transforming component source code.
331-
* For example, it can be used to convert a <style lang="sass"> block into vanilla CSS.
331+
* For example, it can be used to convert a `<style lang="sass">` block into vanilla CSS.
332332
*
333333
* @param {string} source
334334
* @param {PreprocessorGroup | PreprocessorGroup[]} preprocessor

packages/svelte/types/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1247,7 +1247,7 @@ declare module 'svelte/compiler' {
12471247
| AST.SvelteWindow;
12481248
/**
12491249
* The preprocess function provides convenient hooks for arbitrarily transforming component source code.
1250-
* For example, it can be used to convert a <style lang="sass"> block into vanilla CSS.
1250+
* For example, it can be used to convert a `<style lang="sass">` block into vanilla CSS.
12511251
*
12521252
* */
12531253
export function preprocess(source: string, preprocessor: PreprocessorGroup | PreprocessorGroup[], options?: {

0 commit comments

Comments
 (0)