How to use the creoleparser.creole2html function in Creoleparser

To help you get started, we’ve selected a few Creoleparser 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 ThiefMaster / lodgeit / lodgeit / lib / highlighting.py View on Github external
def format_creole(code):
    """Format creole syntax."""
    from creoleparser import creole2html
    rv = creole2html(code)
    if isinstance(rv, str):
        rv = rv.decode('utf-8')
    return u'<div class="wikitext">%s</div>' % rv