Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
syntax: properly configure syntax regions (#92)
Specifically the `yagStr` region exhibits some odd behaviour (even more so in conjunction with jo3-l/yag-template-lsp) in which a newline-terminated double-quoted string extends its match region to EOF, when it should be EOL. Fix this problem by setting the `keepend` attribute on `yagExpr`, which disallows contained regions to go past their respective `end` pattern. This fixes the funky behaviour of `yagStr`, whilst having its respective tests still pass- As a side-effect, we have to set `yagNestedBrace` to `extend`, such that the second nested pair `}}` is highlighted as an error as well. For similar reasons, we must do the same for `yagRawStr`, as it could theoretically contain legally nested braces within the raw string, as exhibited by one of the test cases. Without these secondary changes, tests are failing. Signed-off-by: Luca Zeuch <[email protected]>
- Loading branch information