Fixed missing whitespace in jsDoc comments. Fixes https://github.com/Microsoft/TypeScript/issues/12236
This commit is contained in:
parent
65bb78d569
commit
05b17255f6
|
@ -6358,7 +6358,9 @@ namespace ts {
|
|||
case SyntaxKind.WhitespaceTrivia:
|
||||
// only collect whitespace if we're already saving comments or have just crossed the comment indent margin
|
||||
const whitespace = scanner.getTokenText();
|
||||
if (state === JSDocState.SavingComments || margin !== undefined && indent + whitespace.length > margin) {
|
||||
if (state === JSDocState.SavingComments) {
|
||||
comments.push(whitespace);
|
||||
} else if (margin !== undefined && indent + whitespace.length > margin) {
|
||||
comments.push(whitespace.slice(margin - indent - 1));
|
||||
}
|
||||
indent += whitespace.length;
|
||||
|
|
Loading…
Reference in a new issue