changeset 8874:74baf78202e8

highlight: was broken since 580a79dde2a3 (encoding)
author Dirkjan Ochtman <dirkjan@ochtman.nl>
date Sun, 21 Jun 2009 16:54:57 +0200
parents e872ef2e6758
children 801cacf46e62
files hgext/highlight/__init__.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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')