Beispiel #1
0
def pygmentize(filenode, **kwargs):
    """pygmentize function using pygments

    :param filenode:
    """

    return literal(code_highlight(filenode.content,
                                  filenode.lexer, CodeHtmlFormatter(**kwargs)))
Beispiel #2
0
def pygmentize(filenode, **kwargs):
    """
    pygmentize function using pygments

    :param filenode:
    """
    lexer = get_custom_lexer(filenode.extension) or filenode.lexer
    return literal(markup_whitespace(
        code_highlight(safe_str(filenode.content), lexer, CodeHtmlFormatter(**kwargs))))
Beispiel #3
0
def pygmentize(filenode, **kwargs):
    """pygmentize function using pygments

    :param filenode:
    """

    return literal(
        code_highlight(filenode.content, filenode.lexer,
                       CodeHtmlFormatter(**kwargs)))
Beispiel #4
0
def pygmentize(filenode, **kwargs):
    """
    pygmentize function using pygments

    :param filenode:
    """
    lexer = get_custom_lexer(filenode.extension) or filenode.lexer
    return literal(code_highlight(filenode.content, lexer,
                                  CodeHtmlFormatter(**kwargs)))