pest-parser / pest.vim

Vim syntax highlighting for pest PEG grammar files.
MIT License
31 stars 7 forks source link

Escaped quotes break string highlighting #1

Closed NPN closed 5 years ago

NPN commented 5 years ago

string_escape_bug

In the example above, the class avatar and the backslash after it are not highlighted: (characters marked with a caret below)

rule = { "<div class=\"avatar\"><p>some text</p></div>" }
                       ^^^^^^^

Escaped quotes are not taken into account, so the string is treated as two strings instead of one. The entire string should be highlighted in red.

Note that this does work correctly in the online editor, so perhaps the CodeMirror rules could be reused here.

dbrgn commented 5 years ago

Thanks for the report!

I'm not currently working on a Pest grammar, so this has low priority for me. But pull requests are welcome!