chiark / gitweb /
m.code: fix ANSI lexer compatibility with Pygments 2.12+.
authorVladimír Vondruš <mosra@centrum.cz>
Tue, 4 Oct 2022 10:38:31 +0000 (12:38 +0200)
committerVladimír Vondruš <mosra@centrum.cz>
Tue, 4 Oct 2022 10:55:57 +0000 (12:55 +0200)
I'm still pinned on an older version because of the significant
difference in output, but it shoulnd't crash at least.

plugins/ansilexer.py

index d1c95bda4807dc57e85cd25b6ff6c0c4884f19cd..0524650753fc17610b3d2587ff87dc10f8c2e9bd 100644 (file)
@@ -265,7 +265,8 @@ class HtmlAnsiFormatter(HtmlFormatter):
         '(?P<Suffix>")'
     )
 
-    def wrap(self, source, outfile):
+    # Pygments 2.12+ doesn't have the outfile parameter anymore
+    def wrap(self, source, outfile=None):
         return self._wrap_code(source)
 
     def _wrap_code(self, source):