Skip to content

Commit be3687b

Browse files
committed
change code block lang to svelte
only where it's appropriate
1 parent 294ed32 commit be3687b

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Svelte Language Tools contains a library implementing the Language Server Protoc
2020

2121
A `.svelte` file would look something like this:
2222

23-
```html
23+
```svelte
2424
<script>
2525
let count = 1;
2626

docs/internal/overview.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Our `language-server` can roughly be split into [four areas](/packages/language-
3030
The last area, TS/JS, is where most of the work is done. Svelte is a mix of JavaScript/TypeScript inside `script` and more of it within Svelte's template syntax. To get a holistic view of the file, we need to account for both.
3131
This is also the reason why preprocessors such as `svelte-preprocess` cannot do type checking because it produces wrong diagnostics. To preprocess the script content, it only gets the content from the script. Think of this situation:
3232

33-
```html
33+
```svelte
3434
<script lang="ts">
3535
let a: number = 1;
3636
</script>
@@ -64,7 +64,7 @@ This example shows how our `language-server` uses `svelte2tsx`:
6464

6565
1. Svelte file comes in
6666

67-
```html
67+
```svelte
6868
<script>
6969
export let world = 'name';
7070
</script>

docs/preprocessors/in-general.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ module.exports = {
1717

1818
It's also necessary to add a `type="text/language-name"` or `lang="language-name"` to your `style` and `script` tags, which defines how that code should be interpreted by the extension.
1919

20-
```html
20+
```svelte
2121
<div>
2222
<h1>Hello, world!</h1>
2323
</div>

docs/preprocessors/scss-less.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ module.exports = {
3535

3636
To gain syntax highlighing for your SCSS code and to make us understand the language you are using, add a `type` or `lang` attribute to your style tags like so:
3737

38-
```html
38+
```svelte
3939
<!-- Add type="text/scss" -->
4040
<style type="text/scss">
4141
header {

docs/preprocessors/typescript.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Adding it to an existing project? [The official blog post explains how to do it]
1414

1515
To tell us to treat your script tags as typescript, add a `type` or `lang` attribute to your script tags like so:
1616

17-
```html
17+
```svelte
1818
<!-- Add type="text/typescript" -->
1919
<script type="text/typescript">
2020
export let name: string;
@@ -48,7 +48,7 @@ When you are using TypeScript, you can type which events your component has in t
4848

4949
The first and possibly most often used way is to type the `createEventDispatcher` invocation like this:
5050

51-
```html
51+
```svelte
5252
<script lang="ts">
5353
import { createEventDispatcher } from 'svelte';
5454
@@ -78,7 +78,7 @@ Make sure to follow the [setup instructions](/packages/svelte-vscode#setup)
7878

7979
The following code may throw an error like `Variable 'show' implicitly has type 'any' in some locations where its type cannot be determined.`, if you have stricter type settings:
8080

81-
```html
81+
```svelte
8282
<script lang="typescript">
8383
export let data: { someKey: string | null };
8484

0 commit comments

Comments
 (0)