Armen Arzumanyan
Armen Arzumanyan

Reputation: 2053

How to convert .rst files to .md?

I have a doc as an .rst file, how is it possible to easily and fully convert it to .md? I found a tool named pandoc, but it does not correctly convert the file. It works like

pandoc about.rst -s -o about.md 

Are there any available tools?

Upvotes: 28

Views: 19061

Answers (1)

Steve Piercy
Steve Piercy

Reputation: 15055

First the syntax for using pandoc is:

pandoc [options] [input-file]…

You did this:

pandoc [input-file] [options]…

To correct it, do this:

pandoc -s -o about.md about.rst

As @Waylan mentioned in their comment, Markdown supports a small subset of reStructuredText features. Pandoc, however, provides an extended version of Markdown which can be enabled through extensions. This might resolve some of your errors, but not others.

Ultimately you will need to edit your question to improve it (don't reply with a comment) with the full error stack for further assistance.

Upvotes: 39

Related Questions