Closed idan closed 10 years ago
Of course, this assumes that the Heroku server has pandoc executables installed. With Cedar stack it should be possible to install pandoc.
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.
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/