Mercurial > hg-stable
changeset 38389:23dc901cdf13
highlight: get around tmpl.load() which now returns a parsed tree
Broken at e637dc0b3b1f, "templater: parse template string to tree by
templater class."
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Mon, 18 Jun 2018 21:54:52 +0900 |
parents | daa08d45740f |
children | 1d9c97db465f |
files | hgext/highlight/highlight.py |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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