# HG changeset patch # User Dirkjan Ochtman # Date 1245596097 -7200 # Node ID 74baf78202e88bf50dcd3e5ddf0846bc8db6c5a0 # Parent e872ef2e6758d1fb51d2edb68c2e65a791d5aaec highlight: was broken since 580a79dde2a3 (encoding) diff -r e872ef2e6758 -r 74baf78202e8 hgext/highlight/__init__.py --- a/hgext/highlight/__init__.py Sun Jun 21 16:45:47 2009 +0200 +++ b/hgext/highlight/__init__.py Sun Jun 21 16:54:57 2009 +0200 @@ -25,10 +25,10 @@ import highlight from mercurial.hgweb import webcommands, webutil, common -from mercurial import extensions +from mercurial import extensions, encoding def filerevision_highlight(orig, web, tmpl, fctx): - mt = ''.join(tmpl('mimetype', encoding=web.encoding)) + mt = ''.join(tmpl('mimetype', encoding=encoding.encoding)) # only pygmentize for mimetype containing 'html' so we both match # 'text/html' and possibly 'application/xhtml+xml' in the future # so that we don't have to touch the extension when the mimetype @@ -42,7 +42,7 @@ return orig(web, tmpl, fctx) def annotate_highlight(orig, web, req, tmpl): - mt = ''.join(tmpl('mimetype', encoding=web.encoding)) + mt = ''.join(tmpl('mimetype', encoding=encoding.encoding)) if 'html' in mt: fctx = webutil.filectx(web.repo, req) style = web.config('web', 'pygments_style', 'colorful')