idan / gistio

A gist-backed pretty display for markdown.
https://gist.io
MIT License
485 stars 41 forks source link

Add support for Restructured Text #6

Closed idan closed 10 years ago

btbytes commented 12 years ago

You can use Pandoc along with http://pypi.python.org/pypi/pyandoc/ to render not only ReST, but also a few other markup formats. See http://johnmacfarlane.net/pandoc/

btbytes commented 12 years ago

Of course, this assumes that the Heroku server has pandoc executables installed. With Cedar stack it should be possible to install pandoc.

sigmavirus24 commented 11 years ago

This is easier than you might realize. In fact, relying on anything other than GitHub to do the rendering doesn't seem wise to me given people may expect GFM to work. You simply use the content of the file as is now, and send it back to the GitHub API using their /markdown endpoint. I believe it will parse reStructured Text for you.

Edit I checked (I cheated using sigmavirus24/github3.py) and it does work to parse reST with their /markdown endpoint. Just don't give it a mode and it will work fine.