Skip to content

Commit d2d6d13

Browse files
author
Misha Zamkevich
authored
feat: add +html mixin for pug (#245)
1 parent 23d3e53 commit d2d6d13

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

Diff for: docs/preprocessing.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ Apart from those, the Pug preprocessor accepts:
297297

298298
**Template blocks:**
299299

300-
Some of Svelte's template syntax is invalid in Pug. `svelte-preprocess` provides some pug mixins to represent svelte's `{#...}{/...}` blocks: `+if()`, `+else()`, `+elseif()`, `+each()`, `+await()`, `+then()`, `+catch()`, `+debug()`.
300+
Some of Svelte's template syntax is invalid in Pug. `svelte-preprocess` provides some pug mixins to represent svelte's `{#...}{/...}` blocks: `+if()`, `+else()`, `+elseif()`, `+each()`, `+await()`, `+then()`, `+catch()`, `+html()`, `+debug()`.
301301

302302
```pug
303303
ul

Diff for: src/transformers/pug.ts

+3
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ mixin catch(error)
3636
%_| {:catch !{error}}
3737
%_block
3838
39+
mixin html(expression)
40+
%_| {@html !{expression}}
41+
3942
mixin debug(variables)
4043
%_| {@debug !{variables}}`.replace(
4144
/%_/g,

0 commit comments

Comments
 (0)