Is there any way to convert markdown to asciidoc (or be able to produce the same HTML output)?

Laurent T picture Laurent T · Sep 6, 2011 · Viewed 9.4k times · Source

Here is my problem, normally I convert asciidoc documents to HTML (or more precisely asciidoc --> docbook --> html) but here I've been given a markdown document.

I would like to be able to produce an HTML document from that markdown document that would look the same as if it was coming from an asciidoc OR be able to convert this markdown to asciidoc somehow?

Answer

Richard Dallaway picture Richard Dallaway · Nov 2, 2012

To echo @akosma comment, pandoc does indeed have AsciiDoc support:

# Convert to AsciiDoc from Markdown:
$ pandoc -t asciidoc -f markdown file1.md > file1.txt

You can also go directly from Markdown to HTML:

$ pandoc -S -t html -f markdown file1.md > file1.html

(The -S just to produce nice curly quotes and other Smart typographical changes)