Closed
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