-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Description
Version Used: .NET 5 RC1, Microsoft.CodeAnalysis.CSharp.Workspaces version 3.7.0
Steps to Reproduce:
Debug the following code snippet and inspect the returned classifiedSpans object. Check for the classification type of the leading whitespace trivia of the XmlName identifier token (i.e. the space between "param" and "name" in the analysed string).
Couldn't get the code displayed correctly here, so I am attaching this snap (code borrowed and adapted from here:

Expected Behavior: The leading whitespace should be of XmlDocCommentText type.
Actual Behavior: The returned type of the whitespace is of XmlDocCommentAttributeName type.
Implications: Omnisharp, for instance, defines semantic types sent to the client for highlighting based on the classification types returned by Roslyn. Hence, if we want to create a color theme that underlines XmlDocComment attribute name (such as for example in JetBrains Darcula theme), the the leading whitespace also gets underlined. Example of this can be seen here:
