Skip to content

XML Comment formatting eats spacing inside <code> block #1039

Open
@RenderMichael

Description

@RenderMichael

Environment

  • Visual Studio version: 2022 Community, 17.9 Preview 5
  • CodeMaid version: 12.0
  • Code language: C# 12

Description

/// <summary>
/// Represents an HTML element.
/// </summary>
/// <remarks>
/// Use this like the following:
/// <code>
/// new Element()
/// {
///     Locator = ...,
///     LocatorType = ...,
///     Name = ...,
///     Type = ...
/// }
/// </code>
/// </remarks>
public sealed record Element
{
  // ..
}

Steps to recreate

  1. Take the above text and format it

Current behavior

/// <summary>
/// Represents an HTML element.
/// </summary>
/// <remarks>
/// Use this like the following:
/// <code>
///new Element()
///{
///Locator = ...,
///LocatorType = ...,
///Name = ...,
///Type = ...
///}
/// </code>
/// </remarks>
public sealed record Element
{
  // ..
}

This triggers SA1004 as well as making the output un-formatted.

Expected behavior

Formatting inside a code block is kept.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions