Version Used: Visual Studio 16.11 Preview 1 (using the .NET 6 SDK Preview 4)
Steps to Reproduce:
- Use this code snippet:
class Foo
{
/// <summary>
/// This is a test:
/// <code>
/// while (Foo())
/// {
/// Bar();
/// }
///
/// Baz();
/// </code>
/// </summary>
void Bar()
{
}
}
- Hover on
Bar
- The following appears in the IntelliSense quick info tooltip:

Expected Behavior:
The code inside that <code> block should preserve the original formatting/spacing/newlines, etc.
Interestingly enough, this works fine when viewing the same XML docs through the .NET API browser.
Actual Behavior:
All whitespace characters are lost and the code is just weirdly formatted on a single line.
Version Used: Visual Studio 16.11 Preview 1 (using the .NET 6 SDK Preview 4)
Steps to Reproduce:
BarExpected Behavior:
The code inside that <code> block should preserve the original formatting/spacing/newlines, etc.
Interestingly enough, this works fine when viewing the same XML docs through the .NET API browser.
Actual Behavior:
All whitespace characters are lost and the code is just weirdly formatted on a single line.