diff options
| author | blob1807 <12388588+blob1807@users.noreply.github.com> | 2024-06-28 13:23:55 +1000 |
|---|---|---|
| committer | blob1807 <12388588+blob1807@users.noreply.github.com> | 2024-06-28 13:23:55 +1000 |
| commit | 5516a7b1f029f1dde5ba2f7a73db57eb9cd92745 (patch) | |
| tree | f9450af7280e184f100edbe82ffeeda25f298a04 /editors/vscode/syntaxes/codeblock.json | |
| parent | 974d9b236eea5cecf681d5d261915d6b1e9d2e21 (diff) | |
Add support for syntax highlighting in md
Add support for syntax highlighting with in mark down fenced code block.
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" +} |