From 46e39a16538bb536cc3e0bc8b3971411a25d8cab Mon Sep 17 00:00:00 2001 From: Joel Gardner Date: Tue, 28 Apr 2020 12:48:15 +0200 Subject: [PATCH] Fix Jinja syntax highlighting for when the Jinja syntax is within a tag attribute value. --- mode/django.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mode/django.js b/mode/django.js index 34d67bea..2b2561a5 100644 --- a/mode/django.js +++ b/mode/django.js @@ -2495,7 +2495,9 @@ var DjangoHtmlHighlightRules = function() { }, { token: "constant.language", regex: "\\}\\}", - next: "start" + next: function(currentState, stack) { + return (stack && stack[0]) || "start" + } }]); } };