开发者

Does MarkdownSharp allow inverse translation (HTML to Markdown)?

开发者 https://www.devze.com 2023-03-16 14:03 出处:网络
The title is self-explaining. I would like to translate my Markdown into HTML but also the inverse direction 开发者_如何学Goshould be possible.

The title is self-explaining. I would like to translate my Markdown into HTML but also the inverse direction 开发者_如何学Goshould be possible. How to achieve this using MarkdownSharp?

In case there is no support for bidirection, what tool do you suggest me to use in repace of MarkdownSharp having these features?

Thankyou


I don't think markdownsharp can do it, but Pandoc certainly does.

Convert Html or RTF to Markdown or Wiki Compatible syntax? tells you how to wrap Pandoc in C#.


If you are looking for a native C# implementation I have created a library Html2Markdown. Usage is very simple.

var markdown = new Converter().Convert(html);

Where html is the string representation of the HTML you wish to convert. I actively support it and happily accept contributions.

0

精彩评论

暂无评论...
验证码 换一张
取 消