Here's a little wrong code:
{{if IsTesting}} Is Testing {{#else}} Not testing {{/if}}
Obviously {{if ...}} is missing hashtag. The problem is that parser throws this exception:
Encountered an unknown tag: {{#else}}. It was either not registered or exists in a different context.
This implies that there's something wrong with {{#else}}, while the problem is in if. Maybe you should match {{if\s and throw appropriate error.
Here's a little wrong code: {{if IsTesting}} Is Testing {{#else}} Not testing {{/if}} Obviously {{if ...}} is missing hashtag. The problem is that parser throws this exception:
Encountered an unknown tag: {{#else}}. It was either not registered or exists in a different context.
This implies that there's something wrong with {{#else}}, while the problem is in if. Maybe you should match {{if\s and throw appropriate error.