示例#1
0
文件: __init__.py 项目: motlin/cyg
def annotate_highlight(orig, web, req, tmpl):
    mt = ''.join(tmpl('mimetype', encoding=encoding.encoding))
    if 'html' in mt:
        fctx = webutil.filectx(web.repo, req)
        pygmentize(web, 'annotateline', fctx, tmpl)

    return orig(web, req, tmpl)
示例#2
0
def annotate_highlight(orig, web, req, tmpl):
    mt = ''.join(tmpl('mimetype', encoding=encoding.encoding))
    if 'html' in mt:
        fctx = webutil.filectx(web.repo, req)
        style = web.config('web', 'pygments_style', 'colorful')
        highlight.pygmentize('annotateline', fctx, style, tmpl)
    return orig(web, req, tmpl)
示例#3
0
def annotate_highlight(orig, web, req, tmpl):
    mt = ''.join(tmpl('mimetype', encoding=encoding.encoding))
    if 'html' in mt:
        fctx = webutil.filectx(web.repo, req)
        style = web.config('web', 'pygments_style', 'colorful')
        highlight.pygmentize('annotateline', fctx, style, tmpl)
    return orig(web, req, tmpl)
示例#4
0
def annotate_highlight(orig, web, req, tmpl):
    mt = ''.join(tmpl('mimetype', encoding=encoding.encoding))
    if 'html' in mt:
        fctx = webutil.filectx(web.repo, req)
        pygmentize(web, 'annotateline', fctx, tmpl)

    return orig(web, req, tmpl)