xoofx / markdig

A fast, powerful, CommonMark compliant, extensible Markdown processor for .NET
BSD 2-Clause "Simplified" License
4.41k stars 456 forks source link

[Bug?] Possible incorrect parsing in markdig #783

Closed nopeless closed 8 months ago

nopeless commented 8 months ago

Somehow I found the bug in Show-Markdown which lead me to Powershell/MarkdownRenderer which lead me to here

https://github.com/PowerShell/MarkdownRender/issues/24

I am not a consumer of markdig, but by the way the renderer works I highly suspect that the incorrect renders are from this library

1. [links](#features)
2. `inline code`
3. normal text
4. line

- `also happens in ul`
- line

image

Output on my terminal

nopeless commented 8 months ago

if it's not an issue from this library let me know. I don't know how to test it

MihaZupan commented 8 months ago

Markdig is working correctly here: https://babelmark.github.io/?text=1.+%5Blinks%5D(%23features)%0A2.+%60inline+code%60%0A3.+normal+text%0A4.+line%0A%0A-+%60also+happens+in+ul%60%0A-+line

This is likely a bug in Powershell/MarkdownRenderer, likely here https://github.com/PowerShell/MarkdownRender/blob/8be5371470e57c106c4eb5e6297115741dfcd8ba/src/ListBlockRenderer.cs#L36 (rendering the inline without the block itself)