highlight: get around tmpl.load() which now returns a parsed tree
Broken at
e637dc0b3b1f, "templater: parse template string to tree by
templater class."
--- 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