Closed JohnAD closed 5 years ago
If the last item (token?) in a template is for a sequence,
{{# something}} {{{.}}} {{/ something}}
But that sequence is empty, then an "IndexError" is generated in ignore.
Both conditions have to be true for this to happen. For now, a workaround is simply adding a new empty token at the end. For example:
{{# something}} {{{.}}} {{/ something}} {{ empty_text }}
For reference, the error message (as seen from my PR branch):
moustachu.nim(203) render moustachu.nim(114) render moustachu.nim(55) ignore system.nim(2833) sysFatal Error: unhandled exception: index out of bounds [IndexError]
A fix is already in my PR. As soon as I finish up documentation, I'll request a review.
If the last item (token?) in a template is for a sequence,
But that sequence is empty, then an "IndexError" is generated in ignore.
Both conditions have to be true for this to happen. For now, a workaround is simply adding a new empty token at the end. For example:
For reference, the error message (as seen from my PR branch):
A fix is already in my PR. As soon as I finish up documentation, I'll request a review.