We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 65bb78d commit 05b1725Copy full SHA for 05b1725
src/compiler/parser.ts
@@ -6358,7 +6358,9 @@ namespace ts {
6358
case SyntaxKind.WhitespaceTrivia:
6359
// only collect whitespace if we're already saving comments or have just crossed the comment indent margin
6360
const whitespace = scanner.getTokenText();
6361
- if (state === JSDocState.SavingComments || margin !== undefined && indent + whitespace.length > margin) {
+ if (state === JSDocState.SavingComments) {
6362
+ comments.push(whitespace);
6363
+ } else if (margin !== undefined && indent + whitespace.length > margin) {
6364
comments.push(whitespace.slice(margin - indent - 1));
6365
}
6366
indent += whitespace.length;
0 commit comments