chiark
/
gitweb
/
~cjwatson
/
blog.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b24e138
)
m.code: fix ANSI lexer compatibility with Pygments 2.12+.
author
Vladimír Vondruš
<mosra@centrum.cz>
Tue, 4 Oct 2022 10:38:31 +0000
(12:38 +0200)
committer
Vladimí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
patch
|
blob
|
history
diff --git
a/plugins/ansilexer.py
b/plugins/ansilexer.py
index d1c95bda4807dc57e85cd25b6ff6c0c4884f19cd..0524650753fc17610b3d2587ff87dc10f8c2e9bd 100644
(file)
--- a/
plugins/ansilexer.py
+++ b/
plugins/ansilexer.py
@@
-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):