-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Labels
Description
Q:
Given:
{{define A}}
D
E
F
{{end}}
Or multi-line variables just like that, let's say I have the template setup like below:
A
B
C
{{template A}}
How do I make "template A" stay properly indented on rendering?
A:
Option 1:
A
B
C
{{template A | indent 5 }}
Option 2:
A
B
C
{{template A | pindent 5 }}
Ref:
Lines 186 to 201 in e7798da
| { | |
| `{{ indent 2 "a" }}`, | |
| "a", | |
| }, | |
| { | |
| `{{ indent 2 "a\nb\nc" }}`, | |
| "a\n b\n c", | |
| }, | |
| { | |
| `{{ pindent 2 "a" }}`, | |
| " a", | |
| }, | |
| { | |
| `{{ pindent 2 "a\nb\nc" }}`, | |
| " a\n b\n c", | |
| }, |
PS. I like "Option 1" more because it is more intuitive.