mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-06 20:14:01 -06:00
fix broken regex on "src/services/completions.ts#getCompletionData" (#37546)
* fix broken regex on src/services/completions.ts#840 * update forslash test breaking changes fourslash test Temporarily retain the before fix code for easy comparison * regex * fourslash test (Temporary code * regex: more restrictive in terms of jsdoc format fourslash test * regex: max indent restriction * achieved goal by partial match strategy (probably * cleanup * apply requested changes * Change to a version with minimal modifications
This commit is contained in:
parent
1b7b3eb0f7
commit
fd71eb2c85
@ -875,7 +875,7 @@ namespace ts.Completions {
|
||||
// * |c|
|
||||
// */
|
||||
const lineStart = getLineStartPositionForPosition(position, sourceFile);
|
||||
if (!(sourceFile.text.substring(lineStart, position).match(/[^\*|\s|(/\*\*)]/))) {
|
||||
if (!/[^\*|\s(/)]/.test(sourceFile.text.substring(lineStart, position))) {
|
||||
return { kind: CompletionDataKind.JsDocTag };
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user