Skip to content

Commit 0cd5b44

Browse files
committed
Syntax: Adjust frontmatter punctuation scope
This commit aligns syntax definitions with ST's Markdown.
1 parent 6d58e1e commit 0cd5b44

File tree

3 files changed

+18
-10
lines changed

3 files changed

+18
-10
lines changed

syntaxes/Fold.tmPreferences

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,14 @@
3131
<key>excludeTrailingNewlines</key>
3232
<false/>
3333
</dict>
34+
<dict>
35+
<key>begin</key>
36+
<string>punctuation.section.frontmatter.begin.markdown</string>
37+
<key>end</key>
38+
<string>punctuation.section.frontmatter.end.markdown</string>
39+
<key>excludeTrailingNewlines</key>
40+
<true/>
41+
</dict>
3442
</array>
3543
</dict>
3644
</dict>

syntaxes/Markdown.sublime-syntax

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -319,46 +319,46 @@ contexts:
319319
- match: (---)\s*(?i:(coffee)\s*)\n
320320
captures:
321321
0: meta.frontmatter.markdown
322-
1: punctuation.section.block.begin.frontmatter.markdown
322+
1: punctuation.section.frontmatter.begin.markdown
323323
2: constant.other.language-name.markdown
324324
embed: scope:source.coffee
325325
embed_scope: meta.frontmatter.markdown source.coffee.embedded.markdown
326326
escape: ^(---|\.{3})\s*\n # pandoc requires the remainder of the line to be blank
327327
escape_captures:
328328
0: meta.frontmatter.markdown
329-
1: punctuation.section.block.end.frontmatter.markdown
329+
1: punctuation.section.frontmatter.end.markdown
330330
- match: (---)\s*(?i:(json)\s*)\n
331331
captures:
332332
0: meta.frontmatter.markdown
333-
1: punctuation.section.block.begin.frontmatter.markdown
333+
1: punctuation.section.frontmatter.begin.markdown
334334
2: constant.other.language-name.markdown
335335
embed: scope:source.json
336336
embed_scope: meta.frontmatter.markdown source.json.embedded.markdown
337337
escape: ^(---|\.{3})\s*\n # pandoc requires the remainder of the line to be blank
338338
escape_captures:
339339
0: meta.frontmatter.markdown
340-
1: punctuation.section.block.end.frontmatter.markdown
340+
1: punctuation.section.frontmatter.end.markdown
341341
- match: (---)\s*(?i:(yaml|yml)\s*)?\n
342342
captures:
343343
0: meta.frontmatter.markdown
344-
1: punctuation.section.block.begin.frontmatter.markdown
344+
1: punctuation.section.frontmatter.begin.markdown
345345
2: constant.other.language-name.markdown
346346
embed: scope:source.yaml
347347
embed_scope: meta.frontmatter.markdown source.yaml.embedded.markdown
348348
escape: ^(---|\.{3})\s*\n # pandoc requires the remainder of the line to be blank
349349
escape_captures:
350350
0: meta.frontmatter.markdown
351-
1: punctuation.section.block.end.frontmatter.markdown
351+
1: punctuation.section.frontmatter.end.markdown
352352
- match: (\+{3})\s*\n
353353
captures:
354354
0: meta.frontmatter.markdown
355-
1: punctuation.section.block.begin.frontmatter.markdown
355+
1: punctuation.section.frontmatter.begin.markdown
356356
embed: scope:source.toml
357357
embed_scope: meta.frontmatter.markdown source.toml.embedded.markdown
358358
escape: ^(\+{3})\s*\n
359359
escape_captures:
360360
0: meta.frontmatter.markdown
361-
1: punctuation.section.block.end.frontmatter.markdown
361+
1: punctuation.section.frontmatter.end.markdown
362362

363363
markdown:
364364
- include: indented-code-blocks

syntaxes/MultiMarkdown.sublime-syntax

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ contexts:
2424
- match: ^(---)\s*\n
2525
captures:
2626
0: meta.frontmatter.multimarkdown
27-
1: punctuation.section.block.begin.frontmatter.multimarkdown
27+
1: punctuation.section.frontmatter.begin.multimarkdown
2828
embed: frontmatter-content
2929
embed_scope: meta.frontmatter.multimarkdown
3030
escape: ^(---|\.{3})\s*\n
3131
escape_captures:
3232
0: meta.frontmatter.multimarkdown
33-
1: punctuation.section.block.end.frontmatter.multimarkdown
33+
1: punctuation.section.frontmatter.end.multimarkdown
3434
pop: 1
3535
# Classic key-value frontmatter beginning with first key, terminated by empty line.
3636
- match: ^(?={{header}})

0 commit comments

Comments
 (0)