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

[Bug] Doc comment's <code> block is not correctly rendered when another tags exists before <code> tag #10385

Open
filzrev opened this issue Nov 12, 2024 · 0 comments
Labels
bug A bug to fix

Comments

@filzrev
Copy link
Contributor

filzrev commented Nov 12, 2024

Describe the bug

When <para></para> tag exists before <code> tag,
Rendered HTML results is corrupted.

Example documentation comment

/// <remarks>
/// <para>
/// Dummy paragraph.
/// </para>
/// <code lang="cs">
/// public sealed class Sample
/// {
///     public int AAA {get;set;}
///
///     public int BBB {get;set;}
///
///     public int CCC {get;set;}
/// }
/// </code>
/// </remarks>
public class Sample
{
    public int Dummy { get; set; }
}

Rendered Image
Image

To Reproduce

  1. Set documentation comment described above.
  2. Run docfx metadata command
  3. Run docfx build --serve command
  4. Confirm API page for Sample class

Expected behavior
<code></code> blocks are rendered as expected.

Additional context
To resolve this issue.
It need to add extra new line before <pre> tag.
That is required when embedding HTML tags on markdown text.

See https://github.com/xoofx/markdig/issues/472#issuecomment-683787240 for details

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

No branches or pull requests

1 participant