Consider the following valid Jade or Slim code:
| {{#if someVariableIsTrue}}
| {{#if showComponentOne}}
ComponentOne
| {{/if}}
| {{#if showComponentTwo}}
ComponentTwo
| {{/if}}
| {{/if}}
Versus a more readable but invalid structure:
| {{#if someVariableIsTrue}}
| {{#if showComponentOne}}
ComponentOne
| {{/if}}
| {{#if showComponentTwo}}
ComponentTwo
| {{/if}}
| {{/if}}
The first is valid, the second, while more readable, breaks the Jade/Slim parser.
Now imagine an application FULL of nested if statements and it starts to get a little gangly and very very unreadable.
Does anyone have a solution to this problem? The pipe | character is necessary to output the mustaches in the first place, but it makes code impossible to indent in any readable way.
(Some of you work in HTML, which can be nested however wanted; this is not that problem. This is Jade/Slim.)