mirror of
https://github.com/xoofx/markdig.git
synced 2026-02-03 21:36:36 +00:00
Question: Non HTML Output #112
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 @wmansfield on GitHub (May 13, 2017).
Before I dig (ha) into this, I'd like to know if its possible to use this to parse MarkDown and generate a custom representation that is not html. (a custom XML that describes the content). I'd like to essentially create a translation from markdown to a custom 3rd party format.
@xoofx commented on GitHub (May 14, 2017):
As you have access to a full AST/syntax model, sure you can query and generate anything from it.
Using the
Markdown.Parsethat returns directly aMarkdownDocumentobjectOr using the
Markdown.Convertwhich is working with aIMarkdownRenderer(e.g The HtmlRenderer is an implementation used for rendering to HTML)Note that a Markdown AST can still contains HTML syntax node (like for entities
&or because Markdown allows to have HTML blocks...)@wmansfield commented on GitHub (May 15, 2017):
Thanks for the response. I didn't want to get excited and jump in just to discover a subtle flaw. I'm on it!