Indent-eating is not contained in partials
KitsuneRal opened this issue · 2 comments
KitsuneRal commented
As of Mustache 4.0b2 (but not before), partials eat spaces to the left of them in certain cases. Specifically, if passPartial
is defined as {{#existingSection}}{{/existingSection}}
and partial
is {{#existingSection}}Text{{/existingSection}}
then
No indent
{{#nonExistentSection}}{{/nonExistentSection}}Normal behaviour
{{#existingSection}}{{/existingSection}}Ditto
{{>passPartial}}Indentation gets eaten
{{>partial}}Indentation preserved
No indent
brings
No indent
Normal behaviour
Ditto
Indentation gets eaten
Indentation preserved
No indent
kainjow commented
Sorry for the huge year+ delay. I finally reproduced the bug and attempted a fix with fb872ae. If you're able to verify still that'd be great. I'm going to do some more testing though to see what the behavior is with multi-nested partials.
KitsuneRal commented
Sure, will try, hopefully some time throughout the week.