HTML block parsed incorreclty? #554

Open
opened 2026-01-29 14:39:34 +00:00 by claunia · 0 comments
Owner

Originally created by @MihailsKuzmins on GitHub (Aug 29, 2022).

I am referring to this issue https://github.com/MyNihongo/MudBlazor.Markdown/issues/117

Please refer to this sample:

var pipeline = new MarkdownPipelineBuilder().UseAdvancedExtensions().Build();

const string value =
@"<details>
  <summary markdown=""span"">Release 1.0.1</summary>

**New**
-  Error fixes.

</details>";

var parsedText = Markdown.Parse(value, pipeline);

The input is this HTML string, but Markdig returns 4 elements (<detals> + <summary>, some text in the middle, closing tag for </details>). I would expect it to return a single element which is just the HTML HtmlBlock, but maybe I am wrong in my assumption.

Could you please comment whether or not this behaviour is correct?

image

Originally created by @MihailsKuzmins on GitHub (Aug 29, 2022). I am referring to this issue https://github.com/MyNihongo/MudBlazor.Markdown/issues/117 Please refer to this sample: ```cs var pipeline = new MarkdownPipelineBuilder().UseAdvancedExtensions().Build(); const string value = @"<details> <summary markdown=""span"">Release 1.0.1</summary> **New** - Error fixes. </details>"; var parsedText = Markdown.Parse(value, pipeline); ``` The input is this HTML string, but Markdig returns 4 elements (`<detals>` + `<summary>`, some text in the middle, closing tag for `</details>`). I would expect it to return a single element which is just the HTML `HtmlBlock`, but maybe I am wrong in my assumption. Could you please comment whether or not this behaviour is correct? ![image](https://user-images.githubusercontent.com/47413092/187207204-609aeb74-7480-45f7-8c69-6ddc2b02426d.png)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/markdig#554