Fix multiline jsdoc type highlightingFixes #27777

This commit is contained in:
Matt Bierner
2019-04-11 09:47:06 -07:00
parent 4151e3e1bb
commit 0ae3ecbf15
14 changed files with 1351 additions and 63 deletions

View File

@@ -1,29 +0,0 @@
{
"injectionSelector": "L:comment.block.documentation",
"patterns": [
{
"include": "#markdown-comment"
}
],
"repository": {
"markdown-comment": {
"begin": "(?<=/\\*\\*)([^*]|\\*(?!/))*$",
"while": "(^|\\G)\\s*\\*(?!/)(?=([^*]|[*](?!/))*$)",
"patterns": [
{
"include": "text.html.markdown#fenced_code_block"
},
{
"include": "text.html.markdown#lists"
},
{
"include": "source.ts#docblock"
},
{
"include": "text.html.markdown#inline"
}
]
}
},
"scopeName": "documentation.markdown.injection"
}

View File

@@ -5303,10 +5303,6 @@
},
"jsdoctype": {
"patterns": [
{
"name": "invalid.illegal.type.jsdoc",
"match": "\\G{(?:[^}*]|\\*[^/}])+$"
},
{
"contentName": "entity.name.type.instance.jsdoc",
"begin": "\\G({)",

View File

@@ -5254,10 +5254,6 @@
},
"jsdoctype": {
"patterns": [
{
"name": "invalid.illegal.type.jsdoc",
"match": "\\G{(?:[^}*]|\\*[^/}])+$"
},
{
"contentName": "entity.name.type.instance.jsdoc",
"begin": "\\G({)",

View File

@@ -2,10 +2,31 @@
"injectionSelector": "L:comment.block.documentation",
"patterns": [
{
"include": "#example"
"include": "#jsdocbody"
}
],
"repository": {
"jsdocbody": {
"begin": "(?<=/\\*\\*)([^*]|\\*(?!/))*$",
"while": "(^|\\G)\\s*\\*(?!/)(?=([^*]|[*](?!/))*$)",
"patterns": [
{
"include": "text.html.markdown#fenced_code_block"
},
{
"include": "text.html.markdown#lists"
},
{
"include": "#example"
},
{
"include": "source.ts#docblock"
},
{
"include": "text.html.markdown#inline"
}
]
},
"example": {
"begin": "((@)example)\\s+(?=([^*]|[*](?!/))*$).*$",
"while": "(^|\\G)\\s(?!@)(?=([^*]|[*](?!/))*$)",
@@ -25,5 +46,5 @@
]
}
},
"scopeName": "documentation.example.injection"
"scopeName": "documentation.injection"
}