Closed MichaelAquilina closed 5 years ago
This patch does not seem quite as Windows-friendly, and seems to come with more moving parts, than installing pandoc. I'd be curious to hear more about the assertion that pandoc is "a huge pain in the ass and rarely works as expected", and then we can make technical decisions about concrete and specific issues.
I maintain multiple document sites at ReadTheDocs, so I was in bad need of reStructuredText support in an editor. Thus, finally I made my own extension for Visual Studio Code
My own evaluation of the different preview approaches, such as sphinx, docutils, rst2mdown and now pandoc, only leads me more towards sphinx,
https://blog.lextudio.com/2016/07/update-on-restructuredtext-and-visual-studio-code/
If I simply want to preview the perfect effect (put aside performance, complexity and dependency size), no option comes better than sphinx.
Asking the users to install pandoc to render rst content is a huge pain in the ass and rarely works as expected (I say this from experience using your package).
Python comes with the
rst2html.py
file from the docutils package which can be used to easily convert rst content to html. It is a lot more lightweight in terms of size and is the official way of converting rst content (http://docutils.sourceforge.net/rst.html).I tested this change manually on
sample.rst
as you dont seem to have any specs set up. I don't have pandoc currently installed and it worked without any problems.Something to note:
docutils
andpygments
to be installed.pygments
is semi-optional but is required for syntax highlighting of code blocks.