示例#1
0
文件: tasks.py 项目: mmcnickle/peps
def text2html(input_lines):

    from pep2html import fixfile
    from StringIO import StringIO

    s = StringIO()

    fixfile("", input_lines, s)

    return s.getvalue().decode("utf-8")
示例#2
0
def text2html(input_lines):
    """
    Render a text (non-rst) pep as HTML. This uses all of the original code in
    pep2html.py convertor in the pep repo.
    """

    from pep2html import fixfile
    from StringIO import StringIO

    s = StringIO()

    fixfile("", input_lines, s)

    return s.getvalue().decode("utf-8")