File tree 3 files changed +35
-0
lines changed
3 files changed +35
-0
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,8 @@ feedback you can use [GitHub issues][issues].
10
10
11
11
## New Features
12
12
13
+ - syntax highlighting for LaTeX in fenced code blocks
14
+
13
15
## Changes
14
16
15
17
[ issues ] : https://github.com/SublimeText-Markdown/MarkdownEditing/issues
Original file line number Diff line number Diff line change @@ -1128,6 +1128,7 @@ contexts:
1128
1128
- include : fenced-jsonc
1129
1129
- include : fenced-jspx
1130
1130
- include : fenced-jsx
1131
+ - include : fenced-latex
1131
1132
- include : fenced-lisp
1132
1133
- include : fenced-lua
1133
1134
- include : fenced-makefile
@@ -1624,6 +1625,26 @@ contexts:
1624
1625
1: punctuation.definition.raw.code-fence.end.markdown
1625
1626
2: meta.fold.code-fence.end.markdown
1626
1627
1628
+ fenced-latex :
1629
+ - match : |-
1630
+ (?x)
1631
+ {{fenced_code_block_start}}
1632
+ (?i:\s*(latex|tex))
1633
+ {{fenced_code_block_trailing_infostring_characters}}
1634
+ captures:
1635
+ 0: meta.code-fence.definition.begin.latex.markdown-gfm
1636
+ 2: punctuation.definition.raw.code-fence.begin.markdown
1637
+ 5: constant.other.language-name.markdown
1638
+ 6: comment.line.infostring.markdown
1639
+ 7: meta.fold.code-fence.begin.markdown
1640
+ embed: scope:text.tex.latex
1641
+ embed_scope: markup.raw.code-fence.latex.markdown-gfm
1642
+ escape: '{{fenced_code_block_escape}}'
1643
+ escape_captures:
1644
+ 0: meta.code-fence.definition.end.latex.markdown-gfm
1645
+ 1: punctuation.definition.raw.code-fence.end.markdown
1646
+ 2: meta.fold.code-fence.end.markdown
1647
+
1627
1648
fenced-lisp :
1628
1649
- match : |-
1629
1650
(?x)
Original file line number Diff line number Diff line change @@ -1911,6 +1911,18 @@ for (var i = 0; i < 10; i++) {
1911
1911
|^^ meta.code-fence.definition.end.jsx.markdown-gfm punctuation.definition.raw.code-fence.end.markdown
1912
1912
| ^ meta.code-fence.definition.end.jsx.markdown-gfm meta.fold.code-fence.end - punctuation
1913
1913
1914
+ ``` latex
1915
+ | <- meta.code-fence.definition.begin.latex.markdown-gfm punctuation.definition.raw.code-fence.begin.markdown
1916
+ |^^ meta.code-fence.definition.begin.latex.markdown-gfm punctuation.definition.raw.code-fence.begin.markdown
1917
+ | ^^^^^ meta.code-fence.definition.begin.latex.markdown-gfm constant.other.language-name.markdown
1918
+ | ^ meta.code-fence.definition.begin.latex.markdown-gfm meta.fold.code-fence.begin.markdown - punctuation
1919
+
1920
+ | <- markup.raw.code-fence.latex.markdown-gfm text.tex.latex
1921
+ ```
1922
+ | <- meta.code-fence.definition.end.latex.markdown-gfm punctuation.definition.raw.code-fence.end.markdown
1923
+ |^^ meta.code-fence.definition.end.latex.markdown-gfm punctuation.definition.raw.code-fence.end.markdown
1924
+ | ^ meta.code-fence.definition.end.latex.markdown-gfm meta.fold.code-fence.end.markdown - punctuation
1925
+
1914
1926
``` lisp
1915
1927
|^^^^^^ meta.code-fence.definition.begin - meta.fold
1916
1928
| ^ meta.code-fence.definition.begin meta.fold.code-fence.begin
You can’t perform that action at this time.
0 commit comments