Weave is a text templating engine for .NET that is all about attention to detail. Weave handles the tricky work of making your rendered text beautiful.
MIT License
22
stars
4
forks
source link
Need a delimiter syntax for the `{{each}}` tag. #11
It would be easier if there were a delimiter syntax:
{{each x in y}}
{{= x }} { get; }
{{delimit}}
{{/each}}
Inline version:
new[] { {{each c in tokens}}'{{= c }}'{{delimit}}, {{/each}} }
Simply adding and removing the {{delimit}} token has the added benefit of toggling a trailing delimiter. To encourage this practice, the grammar would emit an error if it is found after the {{none}} token.
Generating text like this is difficult:
new[] { 'a', 'b' }
It would be easier if there were a delimiter syntax:
Inline version:
Simply adding and removing the
{{delimit}}
token has the added benefit of toggling a trailing delimiter. To encourage this practice, the grammar would emit an error if it is found after the{{none}}
token.