File tree Expand file tree Collapse file tree 3 files changed +37
-2
lines changed
Expand file tree Collapse file tree 3 files changed +37
-2
lines changed Original file line number Diff line number Diff line change @@ -145,6 +145,19 @@ interface CreateConfigOptions {
145145}
146146```
147147
148+ ## Limitations
149+
150+ ### Comments in script blocks
151+
152+ Single line comments in Svelte script blocks are not supported.
153+
154+ Use multi-line comments instead.
155+
156+ ``` diff
157+ - let toggled; // comment
158+ + let toggled; /** comment */
159+ ```
160+
148161## Prior art
149162
150163This project is inspired by [ MDsveX] ( https://github.com/pngwn/mdsvex ) .
Original file line number Diff line number Diff line change @@ -69,14 +69,32 @@ Second script block:
6969``` svelte
7070<script>
7171 import Button from "my-svelte-component";
72+
73+
74+ let toggled; /** comment */
7275</script>
7376
7477<Button
78+ bind:toggled
7579 attribute="value"
7680 on:click={() => {
7781 console.log("hello world");
7882 }}
79- >Print 'hello world'</Button>
83+ >Print 'hello world'</Button
84+ >
85+
86+ {toggled}
87+
88+ ```
89+
90+ ``` svelte no-eval
91+ <script>
92+ import { onMount } from "svelte";
93+
94+ onMount(() => {
95+ document.title = 'title';
96+ });
97+ </script>
8098
8199```
82100
Original file line number Diff line number Diff line change 1- <button type =" button" on:click ><slot /></button >
1+ <script >
2+ export let toggled = false ;
3+ </script >
4+
5+ <button type ="button" on:click on:click ={() => (toggled = ! toggled )}><slot /></button >
You can’t perform that action at this time.
0 commit comments