Skip to content

Commit 5f93ca3

Browse files
committed
Make sure to not return an equivalent (but not equal) syntax tree
1 parent 33a3eab commit 5f93ca3

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

OpenStackNetAnalyzers/OpenStackNetAnalyzers/RenderAsMarkdownCodeFix.cs

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

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

0 commit comments

Comments
 (0)