-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptFix AvailableA PR has been opened for this issueA PR has been opened for this issueVS Code PriorityCritical issues that VS Code needs fixed in the current TypeScript milestoneCritical issues that VS Code needs fixed in the current TypeScript milestone
Milestone
Description
Refactors, like 'move to a new file', butchers formatting by removing empty lines in code. As refactors are meant to improve code style and structure, I should not manually have to reformat my code after I've applied one.
TypeScript Version: 3.1.0-dev.20180922
Search Terms:
Move to new file removes newlines, refactor removes newlines, removes whitespace, removes trivia
Code
function example() {
thisIsAnExampleWithSomeSpace();
anotherCallToSomeFunctionHere();
evenMoreStatementsLater();
}
Select function and 'move to a new file' in VS Code:
Expected behavior:
Same formatting:
export function example() {
thisIsAnExampleWithSomeSpace();
anotherCallToSomeFunctionHere();
evenMoreStatementsLater();
}
Actual behavior:
Blank lines removed:
export function example() {
thisIsAnExampleWithSomeSpace();
anotherCallToSomeFunctionHere();
evenMoreStatementsLater();
}
Related Issues:
Perhaps related to #843
mjbvz, yesmeck, raiskila, bencoveney, echenley and 12 more
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptFix AvailableA PR has been opened for this issueA PR has been opened for this issueVS Code PriorityCritical issues that VS Code needs fixed in the current TypeScript milestoneCritical issues that VS Code needs fixed in the current TypeScript milestone