From 14cf2d389a6b93c4a6f68ebdac0970d3bb2fc862 Mon Sep 17 00:00:00 2001 From: vrugtehagel Date: Sun, 21 Dec 2025 23:20:44 +0100 Subject: [PATCH 1/2] Fix `of` highlighting in simple for tag When doing `{{ for foo of bar }}`, the `of` was incorrectly highlighted as variable, because the expression context wasn't properly broken out of after the `foo`. --- Syntaxes/JS expression in Vento.sublime-syntax | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Syntaxes/JS expression in Vento.sublime-syntax b/Syntaxes/JS expression in Vento.sublime-syntax index e4b939b..d2790b1 100644 --- a/Syntaxes/JS expression in Vento.sublime-syntax +++ b/Syntaxes/JS expression in Vento.sublime-syntax @@ -24,10 +24,10 @@ contexts: expression-end: - meta_prepend: true + - match: '(?=\w)' + pop: 2 - match: '' pop: 1 - - match: '(?=\|>|-?}})' - pop: true literal-variable-base: - meta_prepend: true From 6e27af4706cb1d2b7e03801a5eb0d449d8379ea0 Mon Sep 17 00:00:00 2001 From: vrugtehagel Date: Sun, 21 Dec 2025 23:21:37 +0100 Subject: [PATCH 2/2] Add a test for simple for tag --- tests/syntax_test_Vento.txt.vto | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/syntax_test_Vento.txt.vto b/tests/syntax_test_Vento.txt.vto index cf1b3a1..fea990d 100644 --- a/tests/syntax_test_Vento.txt.vto +++ b/tests/syntax_test_Vento.txt.vto @@ -111,6 +111,14 @@ {{# ^^^^^^^^^^^^^^^^^ source.js.embedded.vento #}} {{# ^^ punctuation.definition.embedded.end.vento #}} + {{ for item, index of items }} +{{# ^^ punctuation.definition.embedded.begin.vento #}} +{{# ^^^ keyword.control.loop.for.begin.vento #}} +{{# ^^^^^^^^^^^ source.js.embedded.vento #}} +{{# ^^ keyword.operator.word #}} +{{# ^^^^^ source.js.embedded.vento #}} +{{# ^^ punctuation.definition.embedded.end.vento #}} + {{ continue }}{{ break }} {{# ^^ punctuation.definition.embedded.begin.vento #}} {{# ^^^^^^^^ keyword.control.flow.continue.vento #}}