Skip to content

Commit 49c7e58

Browse files
authored
chore: update Svelte documentation links for template syntax (#2579)
1 parent 0698bc7 commit 49c7e58

File tree

1 file changed

+15
-7
lines changed
  • packages/language-server/src/plugins/svelte/features

1 file changed

+15
-7
lines changed

packages/language-server/src/plugins/svelte/features/SvelteTags.ts

+15-7
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Await blocks allow you to branch on the three possible states of a Promise — p
2323
\`{#await expression}...{:then name}...{/await}\`\\
2424
\`{#await expression then name}...{/await}\`\\
2525
\\
26-
https://svelte.dev/docs#template-syntax-await
26+
https://svelte.dev/docs/svelte/await
2727
`,
2828
each: `\`{#each ...}\`\\
2929
Iterating over lists of values can be done with an each block.
@@ -33,7 +33,7 @@ Iterating over lists of values can be done with an each block.
3333
\`{#each expression as name, index (key)}...{/each}\`\\
3434
\`{#each expression as name}...{:else}...{/each}\`\\
3535
\\
36-
https://svelte.dev/docs#template-syntax-each
36+
https://svelte.dev/docs/svelte/each
3737
`,
3838
if: `\`{#if ...}\`\\
3939
Content that is conditionally rendered can be wrapped in an if block.
@@ -42,7 +42,7 @@ Content that is conditionally rendered can be wrapped in an if block.
4242
\`{#if expression}...{:else if expression}...{/if}\`\\
4343
\`{#if expression}...{:else}...{/if}\`\\
4444
\\
45-
https://svelte.dev/docs#template-syntax-if
45+
https://svelte.dev/docs/svelte/if
4646
`,
4747
key: `\`{#key expression}...{/key}\`\\
4848
Key blocks destroy and recreate their contents when the value of an expression changes.\\
@@ -51,14 +51,22 @@ When used around components, this will cause them to be reinstantiated and reini
5151
#### Usage:
5252
\`{#key expression}...{/key}\`\\
5353
\\
54-
https://svelte.dev/docs#template-syntax-key
54+
https://svelte.dev/docs/svelte/key
5555
`,
5656
snippet: `\`{#snippet identifier(parameter)}...{/snippet}\`\\
5757
Snippets allow you to create reusable UI blocks you can render with the {@render ...} tag.
5858
They also function as slot props for components.
59+
#### Usage:
60+
\`{#snippet identifier(parameter)}...{/snippet}\`\\
61+
\\
62+
https://svelte.dev/docs/svelte/snippet
5963
`,
6064
render: `\`{@render ...}\`\\
6165
Renders a snippet with the given parameters.
66+
#### Usage:
67+
\`{@render identifier(parameter)}\`\\
68+
\\
69+
https://svelte.dev/docs/svelte/@render
6270
`,
6371
html:
6472
`\`{@html ...}\`\\
@@ -72,7 +80,7 @@ If the data comes from an untrusted source, you must sanitize it, ` +
7280
#### Usage:
7381
\`{@html expression}\`\\
7482
\\
75-
https://svelte.dev/docs#template-syntax-html
83+
https://svelte.dev/docs/svelte/@html
7684
`,
7785
debug:
7886
`\`{@debug ...}\`\\
@@ -84,14 +92,14 @@ It accepts a comma-separated list of variable names (not arbitrary expressions).
8492
\`{@debug}\`
8593
\`{@debug var1, var2, ..., varN}\`\\
8694
\\
87-
https://svelte.dev/docs#template-syntax-debug
95+
https://svelte.dev/docs/svelte/@debug
8896
`,
8997
const: `\`{@const ...}\`\\
9098
Defines a local constant}\\
9199
#### Usage:
92100
\`{@const a = b + c}\`\\
93101
\\
94-
https://svelte.dev/docs/special-tags#const
102+
https://svelte.dev/docs/svelte/@const
95103
`
96104
};
97105

0 commit comments

Comments
 (0)