hgext/highlight/highlight.py
changeset 38383 23dc901cdf13
parent 38359 876352ea831e
child 42923 a7abc6081bc5
--- a/hgext/highlight/highlight.py	Sun Jun 17 23:06:20 2018 -0700
+++ b/hgext/highlight/highlight.py	Mon Jun 18 21:54:52 2018 +0900
@@ -44,7 +44,8 @@
 def pygmentize(field, fctx, style, tmpl, guessfilenameonly=False):
 
     # append a <link ...> to the syntax highlighting css
-    old_header = tmpl.load('header')
+    tmpl.load('header')
+    old_header = tmpl.cache['header']
     if SYNTAX_CSS not in old_header:
         new_header = old_header + SYNTAX_CSS
         tmpl.cache['header'] = new_header