avoid eating all preceding empty lines
This commit is contained in:
parent
3433a7800a
commit
58fdd011df
2 changed files with 1 additions and 1 deletions
|
@ -84,7 +84,7 @@ namespace ts.formatting {
|
|||
// if the character at the end of the span is a line break, we shouldn't include it, because it indicates we don't want to
|
||||
// touch the current line at all. Also, on some OSes the line break consists of two characters (\r\n), we should test if the
|
||||
// previous character before the end of format span is line break character as well.
|
||||
while (isLineBreak(sourceFile.text.charCodeAt(endOfFormatSpan))) {
|
||||
if (isLineBreak(sourceFile.text.charCodeAt(endOfFormatSpan))) {
|
||||
endOfFormatSpan--;
|
||||
}
|
||||
const span = {
|
||||
|
|
Loading…
Reference in a new issue