hgext/highlight/__init__.py
changeset 36887 4daa22071d5d
parent 36886 563fd95a6efb
child 37018 3e74d3cc500f
--- a/hgext/highlight/__init__.py	Sat Mar 10 19:57:08 2018 -0800
+++ b/hgext/highlight/__init__.py	Sat Mar 10 20:51:46 2018 -0800
@@ -58,7 +58,7 @@
         highlight.pygmentize(field, fctx, style, tmpl,
                 guessfilenameonly=filenameonly)
 
-def filerevision_highlight(orig, web, req, fctx):
+def filerevision_highlight(orig, web, fctx):
     mt = ''.join(web.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
@@ -70,17 +70,17 @@
     if 'html' in mt:
         pygmentize(web, 'fileline', fctx, web.tmpl)
 
-    return orig(web, req, fctx)
+    return orig(web, fctx)
 
-def annotate_highlight(orig, web, req, tmpl):
+def annotate_highlight(orig, web):
     mt = ''.join(web.tmpl('mimetype', encoding=encoding.encoding))
     if 'html' in mt:
         fctx = webutil.filectx(web.repo, web.req)
         pygmentize(web, 'annotateline', fctx, web.tmpl)
 
-    return orig(web, req, web.tmpl)
+    return orig(web)
 
-def generate_css(web, req, tmpl):
+def generate_css(web):
     pg_style = web.config('web', 'pygments_style', 'colorful')
     fmter = highlight.HtmlFormatter(style=pg_style)
     web.res.headers['Content-Type'] = 'text/css'