Skip to content

Commit 5be0cdd

Browse files
author
Kapil Borle
committed
Add comments to comment token ignoring logic
1 parent e1d5300 commit 5be0cdd

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Rules/UseConsistentIndentation.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,8 @@ public override IEnumerable<DiagnosticRecord> AnalyzeScript(Ast ast, string file
102102
var tempIndentationLevel = indentationLevel;
103103

104104
// Ignore comments
105+
// Since the previous token is a newline token we start
106+
// looking for comments at the token before the newline token.
105107
int j = k - 2;
106108
while (j > 0 && tokens[j].Kind == TokenKind.Comment)
107109
{

0 commit comments

Comments
 (0)