5

What is the best way to convert HTML into Markdown?

I am using C# and the he amount of text being converted would be less than 300 characters or so.

I think:

LeMoussel
  • 5,290
  • 12
  • 69
  • 122
  • unless it is very specific html, it will be very hard to convert it to markdown, as long as markdown is much more restricted than html. If it is very specific, I would go XSLT or HtmlAgility pack way. If you could give your html samples/purpose, I think you would get better answers. – Giedrius Aug 27 '12 at 07:19

1 Answers1

3

Pandoc seems to be a good solution.

This Stackoverflow post Convert Html or RTF to Markdown or Wiki Compatible syntax? explain how to wrap Pandoc in C#

Community
  • 1
  • 1
LeMoussel
  • 5,290
  • 12
  • 69
  • 122