Fixing multi-line partials

This commit is contained in:
Tyler Akins 2017-04-21 09:37:16 -05:00
parent 8142f70769
commit 0ca9970b58
No known key found for this signature in database
GPG Key ID: 8F3B8C432F4393BD
6 changed files with 34 additions and 0 deletions

15
demo/indented-partial Executable file
View File

@ -0,0 +1,15 @@
#!/usr/bin/env bash
export data=$'line 1\nline 2'
cat <<EOF | ../mo
Here is a partial without an indent:
{{> partial}}
And here's the same partial with a 4-space indent:
{{> partial}}
:-)
EOF

1
demo/partial Normal file
View File

@ -0,0 +1 @@
{{data}}

View File

@ -0,0 +1 @@
multilineData=$'line 1\nline2'

View File

@ -0,0 +1,9 @@
Partial:
line 1
line 2
Indented:
line 1
line 2

View File

@ -0,0 +1 @@
{{multilineData}}

View File

@ -0,0 +1,7 @@
Partial:
{{> multi-line-partial.partial}}
Indented:
{{> multi-line-partial.partial}}