Lexer deadlocks on incorrect template instead of erroring
krzysztofzablocki opened this issue · 1 comments
krzysztofzablocki commented
Scenario:
If a tag is not closed properly
e.g.
{{ something
Expectation:
Error is thrown or processing is finished without result.
What happens:
https://github.com/kylef/Stencil/blob/master/Sources/Lexer.swift#L27 deadlocks
// cc @ilyapuchka
krzysztofzablocki commented
I think this can be fixed by simply adding content = ""
here: https://github.com/kylef/Stencil/blob/master/Sources/Lexer.swift#L93
That will break the deadlock and just ignore the given tag? but I didn't analyse exactly how Stencil is implemented so I might be off track