mirror of
https://github.com/xoofx/markdig.git
synced 2026-02-03 21:36:36 +00:00
Serialize MarkdownDocument to XML? #503
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 @wadimw on GitHub (Feb 23, 2022).
Hi,
I'm looking for a way to safely translate existing Markdown documents without risking syntax issues introduced by human error. It seems that your roundtrip support would be perfect for this - in essence, I've been thinking of parsing the document in question with markdig and localizing only selected strings within the AST. That would alleviate the risk of someone accidentally deleting emphasis, inserting an empty line or deleting some significant HTML comment etc.
Translation itself would need to be performed in some other designated system, so I would need to output the generated document tree to some other format and deserialize it afterwards. Do You think it would be possible to serialize an AST of MarkdownDocument into an XML file?