How to use the pandoc.PANDOC_PATH function in pandoc

To help you get started, we’ve selected a few pandoc examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github chaimleib / intervaltree / utils / doc.py View on Github external
def markdown2rst(md):
    """Convert markdown to rst format using pandoc. No other processing."""
    # import here, because outside it might not used
    try:
        import pandoc
    except ImportError as e:
        raise
    else:
        pandoc.PANDOC_PATH = 'pandoc'  # until pyandoc gets updated

    converter = pandoc.Document()
    converter.gfm = md
    rst = converter.rst

    return rst

pandoc

Pandoc Documents for Python

MIT
Latest version published 5 months ago

Package Health Score

71 / 100
Full package analysis