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

Newlines in XML doc <code> elements are not displayed in the IDE, creating an unreadable jumble #54414

Closed
jnm2 opened this issue Jun 26, 2021 · 2 comments
Labels
Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead

Comments

@jnm2
Copy link
Contributor

jnm2 commented Jun 26, 2021

Version Used: 16.10.2, 17.0.0-p1.1

The workaround is to add <br/> to every line (not maintainable) and there is no workaround that allows there to be indentation at the start of the new lines. Maybe this is something #54417 can help with, but if the non-CDATA case doesn't preserve newlines and whitespace by default, then the IDE should warn and prompt to escape the contents of the <code> element as CDATA.

image

/// <summary>
/// <code>
/// public sealed class SomeClass
/// {
///     public void Foo(string name)
///     {
///         Console.WriteLine($"Hello, {name}!");
///     }
///
///     public bool Confirm()
///     {
///         while (true)
///         {
///             var key = Console.ReadKey(intercept: true);
///             if (key.Key == ConsoleKey.Y) return true;
///             if (key.Key == ConsoleKey.N) return false;
///             Console.Beep();
///         }
///     }
/// }
/// </code>
/// </summary>
class C { }
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels Jun 26, 2021
@Youssef1313
Copy link
Member

Youssef1313 commented Jun 26, 2021

This was fixed in #53140 (16.11).

@jnm2
Copy link
Contributor Author

jnm2 commented Jun 26, 2021

Duplicate of #37503.

@jnm2 jnm2 closed this as completed Jun 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead
Projects
None yet
Development

No branches or pull requests

2 participants