In theory, you should be able to define backend-specific snippets with @@markdown:**markdown snippet**@@
or, starting with org-mode 9, exports blocks (#+BEGIN_export markdown
… #+END_export markdown
). However, it seems that not all backends support this, I could only get this working with HTML and LaTeX.
To give a simple example:
This document was exported as @@html:<strong>html</strong>@@
@@rst:**rst**@@ @@markdown:`markdown`@@
#+BEGIN_export rst
This should only show up in reStructuredText.
#+END_export
#+BEGIN_export markdown
This block contains *Markdown*.
#+END_export
In the case at hand, you may get better results using Pandoc. Only a limited subset of org-features is supported by pandoc, but export snippets and export blocks should work. Simply invoke pandoc as pandoc -f org -t rst -o target-file.rst your-org-input-file.org
. The result for the above example would be
This document was exported as **rst**
This should only show up in reStructuredText.
.. raw:: markdown
This block should only show up in Markdown.
Note that inline snippets are dropped if they are not supported by the target format. The Markdown-block is kept as RST allows to define raw blocks the same way org-mode does. One would have to use a pandoc-filter to remove that block if it's not wanted.
(Disclaimer: I'm a pandoc contributor and hence biased, so take that recommendation with a grain of salt.)