Skip to content

Conversation

@filzrev
Copy link
Collaborator

@filzrev filzrev commented Jan 15, 2026

This PR intended to fix #10965

I've added additional code to handle case that <code> element is adjacent to markdown content.

In this case,
It need to insert extra newline, and it need to copy indent chars for TrimEachLine.

@filzrev
Copy link
Collaborator Author

filzrev commented Jan 16, 2026

Commit (057387d) fix issue reported at #10965 (comment)

When HTML tag exists before <pre>.
It require empty line before <pre> block.

Without this empty line <pre> tag code block seems to be handled as markdown by Markdig parser.

Minumum code that reproduce problem with LinqPad
It need to insert empty line between </p> and <pre> tags.

var markdown = Markdig.Markdown.ToHtml(@"
<p>Paragraph</p>
<pre><code class=""lang-csharp"">public class Sample
{
    // line1

    // line2
}</code></pre>");

markdown.Dump();

@filzrev
Copy link
Collaborator Author

filzrev commented Jan 19, 2026

Commit (2c6d4d3) fix issue when parent tag exists before/after <code> tag.
And refactor XML comment processing code.

@filzrev filzrev force-pushed the fix-issue-10965 branch 6 times, most recently from 15d4df0 to 9c920cd Compare January 19, 2026 10:21
@filzrev
Copy link
Collaborator Author

filzrev commented Jan 23, 2026

Latest commit (3b19f12) fix issue when <pre> tag and markdown text exists on same line.

@filzrev filzrev requested a review from yufeih January 24, 2026 03:36
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

Successfully merging this pull request may close these issues.

[Bug] Broken layout after merge of #10855

1 participant