Skip to content

Quick info in IntelliSense strips whitespaces from <code> blocks #53782

@Sergio0694

Description

@Sergio0694

Version Used: Visual Studio 16.11 Preview 1 (using the .NET 6 SDK Preview 4)

Steps to Reproduce:

  1. Use this code snippet:
class Foo
{
    /// <summary>
    /// This is a test:
    /// <code>
    /// while (Foo())
    /// {
    ///     Bar();
    /// }
    /// 
    /// Baz();
    /// </code>
    /// </summary>
    void Bar()
    {
    }
}
  1. Hover on Bar
  2. The following appears in the IntelliSense quick info tooltip:

image

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions