summaryrefslogtreecommitdiff
path: root/sublab_project/utils.py
blob: 6be4950676a0f8e706f007786e9ae32168d79881 (plain)
1
2
3
4
5
6
7
8
9
10
11
"""General utilities module.
"""
from creole import Parser
from creole.html_emitter import HtmlEmitter


def render_creole(content):
    """Returns Creole content rendered as HTML.
    """
    parsed = Parser(content).parse()
    return HtmlEmitter(parsed).emit().encode('utf-8', 'ignore')