File tree Expand file tree Collapse file tree 2 files changed +41
-2
lines changed
Expand file tree Collapse file tree 2 files changed +41
-2
lines changed Original file line number Diff line number Diff line change @@ -33,8 +33,28 @@ contexts:
3333 - include : Text (Jinja).sublime-syntax
3434
3535 main :
36- - meta_prepend : true
36+ - meta_include_prototype : false
3737 - meta_scope : meta.template.jinja
38+ - match : ' '
39+ push : [html, frontmatter]
40+
41+ frontmatter :
42+ - meta_include_prototype : false
43+ - match : \s*(---)\s*\n
44+ captures :
45+ 0 : meta.frontmatter.jinja
46+ 1 : punctuation.section.frontmatter.begin.jinja
47+ 2 : constant.other.language-name.jinja
48+ embed : scope:source.yaml.jinja
49+ embed_scope : meta.frontmatter.jinja source.yaml.embedded.jinja
50+ escape : ^\s*(---)\s*$\n?
51+ escape_captures :
52+ 0 : meta.frontmatter.jinja
53+ 1 : punctuation.section.frontmatter.end.jinja
54+ pop : 1
55+ # Ensure to highlight frontmatter if the syntax is embedded, but pop as early as possible
56+ - match : ^|(?=\S)
57+ pop : 1
3858
3959# ##[ CUSTOM HTML ]############################################################
4060
Original file line number Diff line number Diff line change @@ -25,8 +25,27 @@ contexts:
2525 - include : Text (Jinja).sublime-syntax#jinja-expression-tags
2626
2727 main :
28- - meta_prepend : true
28+ - meta_include_prototype : false
2929 - meta_scope : meta.template.jinja
30+ - match : ' '
31+ push : [markdown, frontmatter]
32+
33+ frontmatter :
34+ - match : \s*(---)\s*\n
35+ captures :
36+ 0 : meta.frontmatter.jinja
37+ 1 : punctuation.section.frontmatter.begin.jinja
38+ 2 : constant.other.language-name.jinja
39+ embed : scope:source.yaml.jinja
40+ embed_scope : meta.frontmatter.jinja source.yaml.embedded.jinja
41+ escape : ^\s*(---)\s*$\n?
42+ escape_captures :
43+ 0 : meta.frontmatter.jinja
44+ 1 : punctuation.section.frontmatter.end.jinja
45+ pop : 1
46+ # Ensure to highlight frontmatter if the syntax is embedded, but pop as early as possible
47+ - match : ^|(?=\S)
48+ pop : 1
3049
3150 html-content :
3251 - include : HTML (Jinja).sublime-syntax#html
You can’t perform that action at this time.
0 commit comments