mirror of
https://github.com/xoofx/markdig.git
synced 2026-02-03 21:36:36 +00:00
Pipe-based markdown tables are not converting correctly to HTML #462
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @nhamawi on GitHub (May 7, 2021).
EDITED TO REPRODUCE OIRIGINAL ISSUE FOR OTHERS THAT MIGHT RUN INTO THE SAME ISSUE
[... or the documentation is missing some relevant setup information]
When trying to convert a pipe-based markdown table to HTML, the result does not include any form of HTML table even with advanced extensions enabled. Instead, the result includes the input text in paragraph blocks < p > and < /p >.
This can be reproduced with .netfiddle as follows and the latest version of Markdig (0.24.0):
And the output:
@MihaZupan commented on GitHub (May 7, 2021):
A few issues here:
Rendermethod, you are calling into the defaultMarkdown.ToHtmlpipeline.Setup(renderer))This can be done like
Or simplify it by using the helpers already provided:
@nhamawi commented on GitHub (May 7, 2021):
Sorry for the obvious and silly oversite as I was reworking code, but was going back and forth with using the render method and just .ToHtml(). Thank you for the quick response!!!