mirror of
https://github.com/xoofx/markdig.git
synced 2026-02-03 21:36:36 +00:00
Two-way conversion/Html.ToMarkdown support #89
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 @KirkMunro on GitHub (Feb 2, 2017).
Have you thought about adding to this library so that it supports HTML to Markdown as well? There are a number of other libraries out there that are really basic (and flawed), that's left me wondering how difficult it would be to extend this to support conversion the other way.
@xoofx commented on GitHub (Feb 3, 2017):
Imho, it is not really "extend"... but more a separate project, using something like AngleSharp. Ideally, even the
HtmlRendererin markdig could have been a package developed outside core markdig... though for 90% of usage, people are looking for translating Markdown to HTML, so I don't like to introduce separate packages for the sake of software design when common usage shows differently...So I don't have any objection to this idea, but as part of a separated project (note that it could be integrated into this repo). PR welcome, as I really don't have any spare time left for this (or even currently personal interests 😅 )
@HardcoreMagazine commented on GitHub (Sep 19, 2023):
I found this tool suitable for the task:
https://github.com/mysticmind/reversemarkdown-net
@Atulin commented on GitHub (Apr 23, 2025):
Seems like the forementioned tool would only be useful in case of basic Markdown. I have some custom extensions added to Markdig (user mentions, spoiler tags, etc) so it would not be able to reverse that.
One of the reasons why I'd hope for something like it to be more integrated into Markdig, so that it could integrate with the extensions as well.