Fixing indentation of partials in a condition

This is to address #19.
This commit is contained in:
Tyler Akins 2017-08-02 10:34:58 -05:00
parent 00af9e978c
commit f14150c205
No known key found for this signature in database
GPG Key ID: 8F3B8C432F4393BD
4 changed files with 11 additions and 1 deletions

2
mo
View File

@ -599,7 +599,7 @@ moParse() {
elif moIsArray "$moTag"; then elif moIsArray "$moTag"; then
eval "moLoop \"\${moBlock[0]}\" \"$moTag\" \"\${!${moTag}[@]}\"" eval "moLoop \"\${moBlock[0]}\" \"$moTag\" \"\${!${moTag}[@]}\""
else else
moParse "${moBlock[0]}" "$moCurrent" false moParse "${moBlock[0]}" "$moCurrent" true
fi fi
fi fi

View File

@ -0,0 +1 @@
thisIsTrue=true

View File

@ -17,3 +17,7 @@ With text
text text
first line first line
second line second line
In a conditional
first line
second line

View File

@ -11,3 +11,8 @@ With text
{{> indented-partials.partial}} {{> indented-partials.partial}}
text text
{{> indented-partials.partial}} {{> indented-partials.partial}}
In a conditional
{{#thisIsTrue}}
{{> indented-partials.partial}}
{{/thisIsTrue}}