More restrictive regex for rename

This commit is contained in:
Matt Bierner
2018-06-18 10:43:11 -07:00
parent e56ebb4862
commit 08bfe78581

View File

@@ -235,7 +235,7 @@ export class UpdateImportsOnFileRenameHandler {
// Workaround for https://github.com/Microsoft/TypeScript/issues/24968
const textChanges = edit.textChanges.map((change): Proto.CodeEdit => {
const match = change.newText.match(/\/[^\/]+$/g);
const match = change.newText.match(/\w\/[^\/]+$/g);
if (!match) {
return change;
}