Added word boundary on tsserver regex (#101598)

Adds a word boundary on the tsserver regex so that it doens't get confused by other file names.
This commit is contained in:
Armando Aguirre 2020-07-02 13:18:57 -07:00 committed by GitHub
parent 378ad1e184
commit 2ddb2c5a72
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -79,7 +79,7 @@ export class TypeScriptServerError extends Error {
if (!message) {
return '';
}
const regex = /(tsserver)?(\.(?:ts|tsx|js|jsx)(?::\d+(?::\d+)?)?)\)?$/igm;
const regex = /(\btsserver)?(\.(?:ts|tsx|js|jsx)(?::\d+(?::\d+)?)?)\)?$/igm;
let serverStack = '';
while (true) {
const match = regex.exec(message);