jehugaleahsa / mustache-sharp

An extension of the mustache text template engine for .NET.
The Unlicense
306 stars 80 forks source link

Prevent stupidity #66

Open arvigeus opened 8 years ago

arvigeus commented 8 years ago

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.