summaryrefslogtreecommitdiff
path: root/editors/vscode/syntaxes/codeblock.json
blob: 0f3ee2eaa3af7d50140c5ff4d2411ecfc70b6989 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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"
}