Skip to content

Commit

Permalink
[Syntax] Don't use embed for verbatim tags highlighting.
Browse files Browse the repository at this point in the history
Embed is generally used for embedding another syntax scope within a given
block.
  • Loading branch information
UltraInstinct05 committed May 11, 2022
1 parent 884d86a commit 20ef0ac
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions resources/syntax/Twig.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -147,14 +147,17 @@ contexts:
1: punctuation.definition.statement.begin.twig
2: keyword.other.tag.twig
3: punctuation.definition.statement.end.twig
embed: constant.character.twig
embed_scope: constant.character.twig
escape: (\{\%)\s*(\bendverbatim\b)\s*(\%\})
escape_captures:
push: verbatim_tag_body

verbatim_tag_body:
- meta_scope: constant.character.twig
- match: (\{\%)\s*(\bendverbatim\b)\s*(\%\})
captures:
0: meta.statement.twig
1: punctuation.definition.statement.begin.twig
2: keyword.other.endtag.twig
3: punctuation.definition.statement.end.twig
pop: 1

expressions:
- include: import_statements
Expand Down

0 comments on commit 20ef0ac

Please sign in to comment.