We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b0f0dc1 commit 4aded27Copy full SHA for 4aded27
1 file changed
src/services/formatting/formatting.ts
@@ -720,10 +720,11 @@ namespace ts.formatting {
720
let tokenIndentation = (isTokenInRange && !rangeContainsError(currentTokenInfo.token)) ?
721
dynamicIndentation.getIndentationForToken(tokenStart.line, currentTokenInfo.token.kind) :
722
Constants.Unknown;
723
- let commentIndentation = dynamicIndentation.getIndentationForComment(currentTokenInfo.token.kind, tokenIndentation);
724
725
if (currentTokenInfo.leadingTrivia) {
+ let commentIndentation = dynamicIndentation.getIndentationForComment(currentTokenInfo.token.kind, tokenIndentation);
726
let indentNextTokenOrTrivia = true;
727
+
728
for (let triviaItem of currentTokenInfo.leadingTrivia) {
729
if (!rangeContainsRange(originalRange, triviaItem)) {
730
continue;
0 commit comments