Fix cref tags on generated VB's SyntaxFactory#62578
Conversation
| Else | ||
| ' Ensure the text does not require escaping. | ||
| Dim filtered = text.Replace("<cref ", "").Replace("/>", "").Replace("&", "").Replace("<", "").Replace(">", "") | ||
| Dim filtered = text.Replace("<see ", "").Replace("/>", "").Replace("&", "").Replace("<", "").Replace(">", "") |
There was a problem hiding this comment.
shouldn't this be "<see cref=", ""?
tbh, i'm not really sure what is going on here...
There was a problem hiding this comment.
The logic in XmlEscape on next line only looks for &, < and >. It doesn't look for = or ".
So I think this is correct.
There was a problem hiding this comment.
It looks like the result of this transformation is only used for a debug assert. e.g., if user says "don't escape the text", then verify in an ad-hoc manner that the text didn't require escaping.
Basically, since "cref" itself doesn't need to be escaped, we don't need to check for it and replace here.
| Else | ||
| ' Ensure the text does not require escaping. | ||
| Dim filtered = text.Replace("<cref ", "").Replace("/>", "").Replace("&", "").Replace("<", "").Replace(">", "") | ||
| Dim filtered = text.Replace("<see ", "").Replace("/>", "").Replace("&", "").Replace("<", "").Replace(">", "") |
There was a problem hiding this comment.
| Dim filtered = text.Replace("<see ", "").Replace("/>", "").Replace("&", "").Replace("<", "").Replace(">", "") | |
| Dim filtered = text.Replace("<see cref ", "").Replace("/>", "").Replace("&", "").Replace("<", "").Replace(">", "") |
There was a problem hiding this comment.
@jcouv - I agree with Cyrus. I think this line needs to be adjusted as shown.
|
@dotnet/roslyn-compiler for review (small change affecting xml docs in some of our code generators) |
* upstream/main: (53 commits) Remove 'mangleName' parameter in PENamedTypeSymbolNonGeneric (dotnet#62813) Produce errors for 'partial file record' (dotnet#62686) [EnC] Allow renaming methods, properties, events etc. (dotnet#62364) Update AbstractFileHeaderDiagnosticAnalyzer.cs Rename file Make static Move tests Refactor Support ref field assignment in object initializers (dotnet#62584) Fix cref tags on generated VB's SyntaxFactory (dotnet#62578) Simplify Simplify Simplify Simplify Simplify Simplify Simplify Simplify Move helper methods Remove serialization ...
FYI @GitHubber17