Sublime-Instincts / BetterJinja

A Sublime Text package that provides enhanced syntax highlighting, completions, snippets & more for Jinja templates.
https://packagecontrol.io/packages/Jinja2
MIT License
15 stars 4 forks source link

[BUG] Escaped single or double quotation marks break syntax highlighting #1

Closed tachyondecay closed 4 years ago

tachyondecay commented 4 years ago

Summary

I have a Jinja HTML template where I have an escaped single quotation mark inside a string quoted with single quotes. This breaks the syntax highlighting for every subsequent line.

Expected Behaviour

Syntax highlighting should work for the entire file.

Actual Behaviour

Syntax highlighting works up to the line with the escaped quotation mark and then doesn't work afterwards.

How to Reproduce

Add an escaped single or double quotation mark to a file that uses BetterJinja highlighting. Here is the exact line as it appears in my template:

{% set description = 'You haven\'t searched yet.' %}

I can confirm that replacing the single quotes with double quotes and not escaping (i.e., "You haven't searched yet.") works fine (and it's honestly what I should do, I guess, but still—bug!).

Environment