mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-18 17:27:54 -05:00
Respond to PR comments
This commit is contained in:
@@ -282,22 +282,13 @@ namespace ts.formatting {
|
||||
}
|
||||
|
||||
function skipToEndOf(node: Node): void {
|
||||
scanner.setTextPos(backUpWhitespace());
|
||||
scanner.setTextPos(node.end);
|
||||
savedPos = scanner.getStartPos();
|
||||
lastScanAction = undefined;
|
||||
lastTokenInfo = undefined;
|
||||
wasNewLine = false;
|
||||
leadingTrivia = undefined;
|
||||
trailingTrivia = undefined;
|
||||
|
||||
function backUpWhitespace(): number {
|
||||
const text = scanner.getText();
|
||||
let end = node.end;
|
||||
while (end > 0 && isWhiteSpaceLike(text.charCodeAt(end - 1))) {
|
||||
end--;
|
||||
}
|
||||
return end;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user