Skip to content

Commit 167c1de

Browse files
deathaxeFichteFoll
authored andcommitted
Syntax: Fix highlighting of included contexts
It is a valid syntax to put the included context name to the line after a `push:` or `set:` statement.
1 parent b86cf0e commit 167c1de

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

Package/Sublime Text Syntax Definition/Sublime Text Syntax Definition.sublime-syntax

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ contexts:
393393
- include: context_list_content
394394
# limit context to the current line
395395
- match: $|(?=\S)
396-
pop: true
396+
set: expect_include
397397
# maybe single include
398398
- match: (?=\S)
399399
set: expect_include

Package/Sublime Text Syntax Definition/syntax_test_sublime-syntax.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,21 @@ contexts: !mytag
287287
pop: 3
288288
# ^ constant.numeric.integer
289289

290+
- match: foo
291+
push:
292+
!mytag scope
293+
# ^^^^^^ storage.type.tag-handle.yaml
294+
# ^^^^^ variable.other.sublime-syntax
295+
296+
- match: foo
297+
push: scope
298+
# ^^^^^ meta.include.sublime-syntax string.unquoted.plain.out.yaml variable.other.sublime-syntax
299+
300+
- match: foo
301+
push:
302+
scope
303+
# ^^^^^ meta.include.sublime-syntax string.unquoted.plain.out.yaml variable.other.sublime-syntax
304+
290305
- match: foo
291306
push:
292307
-

0 commit comments

Comments
 (0)