Skip to content

Commit b97cfd7

Browse files
committed
Make sure to not return an equivalent (but not equal) syntax tree
1 parent 8b017d0 commit b97cfd7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

OpenStackNetAnalyzers/OpenStackNetAnalyzers/RenderAsMarkdownCodeFix.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,9 @@ private async Task<Document> CreateChangedDocument(CodeFixContext context, Docum
122122

123123
SyntaxNode root = await context.Document.GetSyntaxRootAsync(cancellationToken);
124124
SyntaxNode newRoot = root.ReplaceNode(documentationCommentTriviaSyntax, contentsOnly);
125+
if (documentationCommentTriviaSyntax.IsEquivalentTo(contentsOnly))
126+
return context.Document;
127+
125128
return context.Document.WithSyntaxRoot(newRoot);
126129
}
127130

0 commit comments

Comments
 (0)