hgext/highlight/highlight.py
changeset 27637 b502138f5faa
parent 26680 7a3f6490ef97
child 29216 ead25aa27a43
equal deleted inserted replaced
27636:21b363bd87dc 27637:b502138f5faa
    23 def pygmentize(field, fctx, style, tmpl, guessfilenameonly=False):
    23 def pygmentize(field, fctx, style, tmpl, guessfilenameonly=False):
    24 
    24 
    25     # append a <link ...> to the syntax highlighting css
    25     # append a <link ...> to the syntax highlighting css
    26     old_header = tmpl.load('header')
    26     old_header = tmpl.load('header')
    27     if SYNTAX_CSS not in old_header:
    27     if SYNTAX_CSS not in old_header:
    28         new_header =  old_header + SYNTAX_CSS
    28         new_header = old_header + SYNTAX_CSS
    29         tmpl.cache['header'] = new_header
    29         tmpl.cache['header'] = new_header
    30 
    30 
    31     text = fctx.data()
    31     text = fctx.data()
    32     if util.binary(text):
    32     if util.binary(text):
    33         return
    33         return