def rst_to_html(self, content):
try:
from docutils.core import publish_string
return publish_string(content, writer_name="html")
except ImportError:
error_msg = """
RstPreview requires docutils to be installed for the python interpreter that Sublime uses.
run: `sudo easy_install-2.6 docutils` and restart Sublime (if on Mac OS X or Linux).
For Windows check the docs at https://github.com/d0ugal/RstPreview
"""
sublime.error_message(error_msg)
raise
评论列表
文章目录