Skip to content

Commit 05f4147

Browse files
authored
Add more directives to syntax-highlight markdown in them (#45)
1 parent de03ad9 commit 05f4147

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

syntaxes/myst.tmLanguage

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@
125125
<key>comment</key>
126126
<string>These are directive blocks, whereby the content, should be treated as markdown</string>
127127
<key>begin</key>
128-
<string>(^|\G)(\s*)(`{3,}|~{3,})\{(attention|caution|danger|error|important|hint|note|tip|warning)\}\s*(?=([^`~]*)?$)</string>
128+
<string>(^|\G)(\s*)(`{3,}|~{3,})\{(attention|caution|danger|error|important|hint|note|tip|warning|admonition|margin|sidebar|toggle|dropdown|panels|epigraph|glossary|tabbed|div|figure)\}\s*(?=([^`~]*)?$)</string>
129129
<key>beginCaptures</key>
130130
<dict>
131131
<key>3</key>

template/directives.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,17 @@ admonition_classes:
88
- note
99
- tip
1010
- warning
11+
- admonition
12+
- margin
13+
- sidebar
14+
- toggle
15+
- dropdown
16+
- panels
17+
- epigraph
18+
- glossary
19+
- tabbed
20+
- div
21+
- figure
1122
code_classes:
1223
- code
1324
- code-block

0 commit comments

Comments
 (0)