Source

django-markitup / markitup / renderers.py

1
2
3
4
5
6
7
try:
    from docutils.core import publish_parts
    def render_rest(markup, **docutils_settings):
        parts = publish_parts(source=markup, writer_name="html4css1", settings_overrides=docutils_settings)
        return parts["html_body"]
except ImportError:
    pass