Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more directives to syntax-highlight markdown in them #45

Merged
merged 2 commits into from
Mar 6, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Add more directives (chiefly taken from https://jupyterbook.org/en/st…
  • Loading branch information
tfiers committed May 23, 2022
commit 0157bb54faf7b6d2b772fc02cd38d09044bf2311
2 changes: 1 addition & 1 deletion syntaxes/myst.tmLanguage
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
<key>comment</key>
<string>These are directive blocks, whereby the content, should be treated as markdown</string>
<key>begin</key>
<string>(^|\G)(\s*)(`{3,}|~{3,})\{(attention|caution|danger|error|important|hint|note|tip|warning|admonition|margin|toggle)\}\s*(?=([^`~]*)?$)</string>
<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>
<key>beginCaptures</key>
<dict>
<key>3</key>
Expand Down
8 changes: 8 additions & 0 deletions template/directives.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,15 @@ admonition_classes:
- warning
- admonition
- margin
- sidebar
- toggle
- dropdown
- panels
- epigraph
- glossary
- tabbed
- div
- figure
code_classes:
- code
- code-block
Expand Down