Closed NightfallAlicorn closed 7 years ago
The crash doesn't occur if the description "- Print getUpdate results in console." isn't already on the line.
Root cause seems to be this expression in the jsdoc grammar:
{
"name": "variable.other.jsdoc",
"match": "(?x)\n(\\[)\\s*\n[\\w$]+\n(?:\n (?:\\[\\])? # Foo[ ].bar properties within an array\n \\. # Foo.Bar namespaced parameter\n [\\w$]+\n)*\n(?:\n \\s*\n (=) # [foo=bar] Default parameter value\n \\s*\n (\n # The inner regexes are to stop the match early at */ and to not stop at escaped quotes\n (?:\n \"(?:(?:\\*(?!/))|(?:\\\\(?!\"))|[^*\\\\])*?\" | # [foo=\"bar\"] Double-quoted\n '(?:(?:\\*(?!/))|(?:\\\\(?!'))|[^*\\\\])*?' | # [foo='bar'] Single-quoted\n \\[ (?:(?:\\*(?!/))|[^*])*? \\] | # [foo=[1,2]] Array literal\n (?:(?:\\*(?!/))|[^*])*? # Everything else\n )*\n )\n)?\n\\s*(?:(\\])((?:[^*\\s]|\\*[^\\s/])+)?|(?=\\*/))",
"captures": {
"1": {
"name": "punctuation.definition.optional-value.begin.bracket.square.jsdoc"
},
"2": {
"name": "keyword.operator.assignment.jsdoc"
},
"3": {
"name": "source.embedded.js"
},
"4": {
"name": "punctuation.definition.optional-value.end.bracket.square.jsdoc"
},
"5": {
"name": "invalid.illegal.syntax.jsdoc"
}
},
"begin": "\\[",
"end": "\\]|(?=\\*/)",
"patterns": [
]
}
I believe this expression is causing oniguruma
to hang
Moved upstream to https://github.com/Microsoft/TypeScript-TmLanguage/issues/515 I have a PR out with a fix on that repo
I'm currently following this guide on how to add optional JSDoc param with default value. http://usejsdoc.org/tags-param.html#parameters-with-properties
Steps to Reproduce:
Reproduces without extensions: Yes