mirror of
https://github.com/xoofx/markdig.git
synced 2026-02-11 13:54:50 +00:00
HtmlRender.Render() not equivalent to Markdown.ToHtml() #502
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 @jo3w4rd on GitHub (Feb 8, 2022).
Are these expected to produce the same results? When using the PipeTables extension,
Render()simply wraps the table cells inptags (without andtable,tbody, etc.).ToHtml()produces the full HTML table, as expected.HtmlRender.Render()never hits a breakpoint in theHtmlTableRender.Write()method, whereasToHtml()does. Am I missing a step for setting up the renderer object?(For context, I am exploring writing a different renderer.)
ToHTML()output (testStringA)Render()(testStringB):Input markdown:
@MihaZupan commented on GitHub (Feb 8, 2022):
You were very close :)
Effectively, you weren't adding an
HtmlTableRendererto theHtmlRenderer, so there was no renderer accepting aTableelement.So if you were to write a custom table renderer, you most likely want to setup the
HtmlRendererand then replace theHtmlTableRenderer:@jo3w4rd commented on GitHub (Feb 8, 2022):
Great, thank you!