Skip to content

Commit 7ef83f7

Browse files
committed
Add support for interpolated TOML frontmatter
1 parent 4aa0533 commit 7ef83f7

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

Syntaxes/HTML/HTML (Jinja).sublime-syntax

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,17 @@ contexts:
5252
0: meta.frontmatter.jinja
5353
1: punctuation.section.frontmatter.end.jinja
5454
pop: 1
55+
- match: \s*(\+{3})\s*\n
56+
captures:
57+
0: meta.frontmatter.jinja
58+
1: punctuation.section.frontmatter.begin.jinja
59+
embed: scope:source.toml.jinja
60+
embed_scope: meta.frontmatter.jinja source.toml.embedded.jinja
61+
escape: ^\s*(\+{3})\s*\n
62+
escape_captures:
63+
0: meta.frontmatter.jinja
64+
1: punctuation.section.frontmatter.end.jinja
65+
pop: 1
5566
# Ensure to highlight frontmatter if the syntax is embedded, but pop as early as possible
5667
- match: ^|(?=\S)
5768
pop: 1

Syntaxes/Markdown/Markdown (Jinja).sublime-syntax

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,17 @@ contexts:
4343
0: meta.frontmatter.jinja
4444
1: punctuation.section.frontmatter.end.jinja
4545
pop: 1
46+
- match: \s*(\+{3})\s*\n
47+
captures:
48+
0: meta.frontmatter.jinja
49+
1: punctuation.section.frontmatter.begin.jinja
50+
embed: scope:source.toml.jinja
51+
embed_scope: meta.frontmatter.jinja source.toml.embedded.jinja
52+
escape: ^\s*(\+{3})\s*\n
53+
escape_captures:
54+
0: meta.frontmatter.jinja
55+
1: punctuation.section.frontmatter.end.jinja
56+
pop: 1
4657
# Ensure to highlight frontmatter if the syntax is embedded, but pop as early as possible
4758
- match: ^|(?=\S)
4859
pop: 1

0 commit comments

Comments
 (0)