fix wrong replace
This commit is contained in:
parent
394772e0b9
commit
bffc00e668
2 changed files with 2 additions and 2 deletions
|
@ -300,7 +300,7 @@ export default class TypeScriptCompletionItemProvider implements CompletionItemP
|
||||||
if (additionalTextEdits.length && this.noSemicolons) {
|
if (additionalTextEdits.length && this.noSemicolons) {
|
||||||
// remove comma
|
// remove comma
|
||||||
additionalTextEdits.forEach(o => {
|
additionalTextEdits.forEach(o => {
|
||||||
o.newText = o.newText.replace(/;(?:(\n|$))/g, '')
|
o.newText = o.newText.replace(/;(?=(\n|$))/g, '')
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -50,7 +50,7 @@ export class OrganizeImportsCommand implements Command {
|
||||||
if (changes) {
|
if (changes) {
|
||||||
for (let c of Object.keys(changes)) {
|
for (let c of Object.keys(changes)) {
|
||||||
for (let textEdit of changes[c]) {
|
for (let textEdit of changes[c]) {
|
||||||
textEdit.newText = textEdit.newText.replace(/;(?:(\n|$))/g, '')
|
textEdit.newText = textEdit.newText.replace(/;(?=(\n|$))/g, '')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue