diff options
| author | DanielGavin <danielgavin5@hotmail.com> | 2024-06-28 17:14:32 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-28 17:14:32 +0200 |
| commit | cd46aa86777d203ddc67f31eaa60ee763cef3d87 (patch) | |
| tree | 3e89dddd3953c4b1c15c4250487109037fc6b298 /editors/vscode/syntaxes/codeblock.json | |
| parent | 670c350550d3f9d41b864be593fc3f43a43f99fa (diff) | |
| parent | 5516a7b1f029f1dde5ba2f7a73db57eb9cd92745 (diff) | |
Merge pull request #416 from blob1807/master
[vscode] Add support for syntax highlighting in md
Diffstat (limited to 'editors/vscode/syntaxes/codeblock.json')
| -rw-r--r-- | editors/vscode/syntaxes/codeblock.json | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/editors/vscode/syntaxes/codeblock.json b/editors/vscode/syntaxes/codeblock.json new file mode 100644 index 0000000..0f3ee2e --- /dev/null +++ b/editors/vscode/syntaxes/codeblock.json @@ -0,0 +1,45 @@ +{ + "comment": "Taken from https://github.com/microsoft/vscode/blob/main/extensions/markdown-basics/syntaxes/markdown.tmLanguage.json", + "injectionSelector": "L:text.html.markdown", + "patterns": [ + { + "include": "#fenced_code_block_odin" + } + ], + "repository": { + "fenced_code_block_odin": { + "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(odin)((\\s+|:|,|\\{|\\?)[^`]*)?$)", + "name": "markup.fenced_code.block.markdown", + "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", + "beginCaptures": { + "3": { + "name": "punctuation.definition.markdown" + }, + "4": { + "name": "fenced_code.block.language.markdown" + }, + "5": { + "name": "fenced_code.block.language.attributes.markdown" + } + }, + "endCaptures": { + "3": { + "name": "punctuation.definition.markdown" + } + }, + "patterns": [ + { + "begin": "(^|\\G)(\\s*)(.*)", + "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", + "contentName": "meta.embedded.block.odin", + "patterns": [ + { + "include": "source.odin" + } + ] + } + ] + } + }, + "scopeName": "markdown.odin.codeblock" +} |