Closed sc0ttj closed 1 year ago
Not without rewriting how mo
works, such as including a tokenizer or AST or other amazing technology that will handle the nested braces. Normally one will use syntax like this
{{! This is a comment }}
That won't work because you want to include the closing delimiter (}}
) inside your comment.
{{! This is a comment but it {{fails}} on the embedded mustache syntax }}
The parser right now will stop the comment at the first set of close braces, which is (I believe) in-line with how the official spec would have it. I do not believe you are able to do what you want this way.
Another option is to use something that will equate to false.
{{false}}
This is all hidden.
Even the use of {{variables}} is ignored.
{{/false}}
Is that what you are looking to do?
One idea would be to switch the delimiters. This was just added to mo
and I'd recommend giving that a shot.
I can reopen this issue if you still have issues with it.
Hi,
I'd like to be able to document how my templates work in my blog, but I'm having trouble compiling pages which contain templates examples, because
mo
is always parsing them - I'd like to be able to forcemo
to skip certain blocks:Is there any easy way to achieve this?
Thanks :)