mirror of
https://github.com/tests-always-included/mo.git
synced 2025-11-19 23:34:32 +01:00
Fixing multi-line partials
This commit is contained in:
15
demo/indented-partial
Executable file
15
demo/indented-partial
Executable 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
1
demo/partial
Normal file
@@ -0,0 +1 @@
|
||||
{{data}}
|
||||
1
tests/multi-line-partial.env
Normal file
1
tests/multi-line-partial.env
Normal file
@@ -0,0 +1 @@
|
||||
multilineData=$'line 1\nline2'
|
||||
9
tests/multi-line-partial.expected
Normal file
9
tests/multi-line-partial.expected
Normal file
@@ -0,0 +1,9 @@
|
||||
Partial:
|
||||
|
||||
line 1
|
||||
line 2
|
||||
|
||||
Indented:
|
||||
|
||||
line 1
|
||||
line 2
|
||||
1
tests/multi-line-partial.partial
Normal file
1
tests/multi-line-partial.partial
Normal file
@@ -0,0 +1 @@
|
||||
{{multilineData}}
|
||||
7
tests/multi-line-partial.template
Normal file
7
tests/multi-line-partial.template
Normal file
@@ -0,0 +1,7 @@
|
||||
Partial:
|
||||
|
||||
{{> multi-line-partial.partial}}
|
||||
|
||||
Indented:
|
||||
|
||||
{{> multi-line-partial.partial}}
|
||||
Reference in New Issue
Block a user