Skip to content

Commit

Permalink
Fix SyntaxUtils.SpansSingleLine
Browse files Browse the repository at this point in the history
  • Loading branch information
Chicken-Bones committed Feb 26, 2020
1 parent 85f0292 commit 2154507
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion setup/Setup/Formatting/SyntaxUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public static class SyntaxUtils
// return lineSpan.StartLinePosition.Line == lineSpan.EndLinePosition.Line;
//}

public static bool SpansSingleLine(this SyntaxNode node) => !node.DescendantTrivia().Any(t => t.IsKind(SyntaxKind.EndOfLineTrivia));
public static bool SpansSingleLine(this SyntaxNode node) => !node.DescendantTrivia(node.Span).Any(t => t.IsKind(SyntaxKind.EndOfLineTrivia));

public static bool IsWhitespace(this SyntaxTrivia trivia) => trivia.IsKind(SyntaxKind.WhitespaceTrivia) || trivia.IsKind(SyntaxKind.EndOfLineTrivia);

Expand Down

0 comments on commit 2154507

Please sign in to comment.