Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
RenderMichael opened this issue Feb 12, 2024 · 1 comment
Open

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

RenderMichael opened this issue Feb 12, 2024 · 1 comment

Comments

@RenderMichael
Copy link

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.

@RenderMichael
Copy link
Author

I fidgeted with the settings and couldn't find one to turn this off, so for now I turned off format-on-save for comments completely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant