mirror of
https://github.com/xoofx/markdig.git
synced 2026-02-04 05:44:50 +00:00
How hard to add full-fidelity round-tripping? #304
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 @jazzdelightsme on GitHub (Jun 20, 2019).
How difficult of a change would it be to add support for full-fidelity round-tripping?
I see you have already added the beginning of support for normalization (#155), but in my view, normalization is distinct from round-tripping. To be clear, I mean I'd like to be able to parse the document, then (assuming I don't make any changes), write it back out (as markdown), and the result should be byte-for-byte identical.
The reason is that I'd like to make certain programmatic transformations of large bodies of documents, but I can't be going in and "normalizing" everything (that would actually be desirable at some point as a separate exercise; but it's just too much change for now).
@xoofx commented on GitHub (Jun 20, 2019):
Quite some work, difficult to say in details as I haven't touched the code deeply for the past 2 years. But there are many parts that are today completely discarded (e.g exact number of spaces in all situations - blank lines - spaces after list items...etc.)
But It is certainly doable.
@jazzdelightsme commented on GitHub (Jul 3, 2019):
Thank you!