From ca33fec123ec75d78cb9bdfc41d64190e30b1d33 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Tue, 4 Oct 2022 12:38:31 +0200 Subject: [PATCH] m.code: fix ANSI lexer compatibility with Pygments 2.12+. 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 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/ansilexer.py b/plugins/ansilexer.py index d1c95bda..05246507 100644 --- a/plugins/ansilexer.py +++ b/plugins/ansilexer.py @@ -265,7 +265,8 @@ class HtmlAnsiFormatter(HtmlFormatter): '(?P")' ) - 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): -- 2.30.2