83 lines
2.4 KiB
JSON
83 lines
2.4 KiB
JSON
|
{
|
||
|
"name": "rustdoc",
|
||
|
"patterns": [
|
||
|
{
|
||
|
"include": "#fenced_code_block"
|
||
|
},
|
||
|
{
|
||
|
"include": "#markdown"
|
||
|
}
|
||
|
],
|
||
|
"scopeName": "text.html.markdown.rustdoc",
|
||
|
"repository": {
|
||
|
"markdown": {
|
||
|
"patterns": [
|
||
|
{
|
||
|
"include": "text.html.markdown"
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
"fenced_code_block": {
|
||
|
"patterns": [
|
||
|
{
|
||
|
"include": "#fenced_code_block_rust"
|
||
|
},
|
||
|
{
|
||
|
"include": "#fenced_code_block_unknown"
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
"fenced_code_block_rust": {
|
||
|
"begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(rust|not run|not_run)?((\\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.rust",
|
||
|
"patterns": [
|
||
|
{
|
||
|
"include": "source.rust"
|
||
|
}
|
||
|
]
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
"fenced_code_block_unknown": {
|
||
|
"begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?=([^`~]+)?$)",
|
||
|
"beginCaptures": {
|
||
|
"3": {
|
||
|
"name": "punctuation.definition.markdown"
|
||
|
},
|
||
|
"4": {
|
||
|
"name": "fenced_code.block.language"
|
||
|
}
|
||
|
},
|
||
|
"end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$",
|
||
|
"endCaptures": {
|
||
|
"3": {
|
||
|
"name": "punctuation.definition.markdown"
|
||
|
}
|
||
|
},
|
||
|
"name": "markup.fenced_code.block.markdown"
|
||
|
}
|
||
|
}
|
||
|
}
|