-
Notifications
You must be signed in to change notification settings - Fork 13.1k
Open
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: LS: Refactoringse.g. extract to constant or function, rename symbole.g. extract to constant or function, rename symbol
Milestone
Description
re: #27294 (comment) microsoft/vscode#96172
Refactoring changes formatting in the sense that it removes empty lines, which is fixed by #36688 but another issue is that it breaks original code into 2 lines in some cases.
TypeScript Version: 3.9.0-dev.20200425
Search Terms: refactor, empty line, linebreak, formatting persistence.
Given the following piece of code, when I extract the condition and console.log into a function, console.log moves to a new line.
if (true) console.log('On the same line');Expected behavior:
log();
function log () {
if (true) console.log('On the same line');
}Actual behavior:
log();
function log () {
if (true)
console.log('On the same line');
}Related Issues: #27294 microsoft/vscode#96172
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: LS: Refactoringse.g. extract to constant or function, rename symbole.g. extract to constant or function, rename symbol