mirror of
https://github.com/xoofx/markdig.git
synced 2026-02-03 21:36:36 +00:00
[Question] How conver MarkdownDocument back to markdown #184
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 @LSTANCZYK on GitHub (Jan 23, 2018).
I have MarkdownDocument instance and want to convert it back to markdown text after my document manipulation. How can i do that?
@xoofx commented on GitHub (Jan 25, 2018):
You can use the NormalizeRenderer as it is used in Markdown.Normalize:
eedfc3cd9c/src/Markdig/Markdown.cs (L54-L59)You have a call to a Parse method here, but you reusing your own MarkdownDocument, you can call then renderer yourself.
Note that saving back to MarkdownDocument supports mainly core CommonMark and very vew Markdig extensions (see #155)