comparison hgext/highlight/highlight.py @ 51700:7f0cb9ee0534

Backout accidental publication of a large range of revisions I accidentally published 25e7f9dcad0f::bd1483fd7088, this is the inverse.
author Raphaël Gomès <rgomes@octobus.net>
date Tue, 23 Jul 2024 10:02:46 +0200
parents 493034cc3265
children ca7bde5dbafb
comparison
equal deleted inserted replaced
51699:bd1483fd7088 51700:7f0cb9ee0534
41 b'\n<link rel="stylesheet" href="{url}highlightcss" type="text/css" />' 41 b'\n<link rel="stylesheet" href="{url}highlightcss" type="text/css" />'
42 ) 42 )
43 43
44 44
45 def pygmentize(field, fctx, style, tmpl, guessfilenameonly=False): 45 def pygmentize(field, fctx, style, tmpl, guessfilenameonly=False):
46
46 # append a <link ...> to the syntax highlighting css 47 # append a <link ...> to the syntax highlighting css
47 tmpl.load(b'header') 48 tmpl.load(b'header')
48 old_header = tmpl.cache[b'header'] 49 old_header = tmpl.cache[b'header']
49 if SYNTAX_CSS not in old_header: 50 if SYNTAX_CSS not in old_header:
50 new_header = old_header + SYNTAX_CSS 51 new_header = old_header + SYNTAX_CSS