mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 04:49:35 +00:00
Split js doc injection into js and specific ones
This commit is contained in:
parent
b20a4cbc5d
commit
de2c32f69d
|
@ -80,10 +80,16 @@
|
|||
},
|
||||
{
|
||||
"scopeName": "documentation.injection",
|
||||
"path": "./syntaxes/jsdoc.injection.tmLanguage.json",
|
||||
"path": "./syntaxes/jsdoc.ts.injection.tmLanguage.json",
|
||||
"injectTo": [
|
||||
"source.ts",
|
||||
"source.tsx",
|
||||
"source.tsx"
|
||||
]
|
||||
},
|
||||
{
|
||||
"scopeName": "documentation.injection",
|
||||
"path": "./syntaxes/jsdoc.js.injection.tmLanguage.json",
|
||||
"injectTo": [
|
||||
"source.js",
|
||||
"source.js.jsx"
|
||||
]
|
||||
|
|
|
@ -0,0 +1,54 @@
|
|||
|
||||
{
|
||||
"injectionSelector": "L:comment.block.documentation",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#jsdocbody"
|
||||
}
|
||||
],
|
||||
"repository": {
|
||||
"jsdocbody": {
|
||||
"begin": "(?<=/\\*\\*)([^*]|\\*(?!/))*$",
|
||||
"while": "(^|\\G)\\s*\\*(?!/)(?=([^*]|[*](?!/))*$)",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "text.html.markdown#fenced_code_block_js"
|
||||
},
|
||||
{
|
||||
"include": "text.html.markdown#fenced_code_block_ts"
|
||||
},
|
||||
{
|
||||
"include": "text.html.markdown#fenced_code_block_unknown"
|
||||
},
|
||||
{
|
||||
"include": "#example"
|
||||
},
|
||||
{
|
||||
"include": "source.ts#docblock"
|
||||
},
|
||||
{
|
||||
"include": "text.html.markdown#inline"
|
||||
}
|
||||
]
|
||||
},
|
||||
"example": {
|
||||
"begin": "((@)example)\\s+(?=([^*]|[*](?!/))*$).*$",
|
||||
"while": "(^|\\G)\\s(?!@)(?=([^*]|[*](?!/))*$)",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "storage.type.class.jsdoc"
|
||||
},
|
||||
"2": {
|
||||
"name": "punctuation.definition.block.tag.jsdoc"
|
||||
}
|
||||
},
|
||||
"contentName": "meta.embedded.block.example.source.ts",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "source.js.jsx"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"scopeName": "documentation.injection"
|
||||
}
|
Loading…
Reference in a new issue