mirror of
https://gitlab.com/tildes/tildes.git
synced 2026-04-16 06:18:34 +02:00
Update Pygments to 2.19.2 (was 2.9.0)
See merge request tildes/tildes!174
This commit is contained in:
@@ -78,7 +78,7 @@ pycparser==2.22
|
||||
pydocstyle==6.3.0
|
||||
pyflakes==3.4.0
|
||||
pygit2==1.18.1
|
||||
pygments==2.9.0
|
||||
pygments==2.19.2
|
||||
pylint==3.3.8
|
||||
pylint-celery==0.3
|
||||
pylint-django==2.6.1
|
||||
|
||||
@@ -17,7 +17,7 @@ prometheus-client
|
||||
psycopg2
|
||||
publicsuffix2==2.20160818
|
||||
pygit2
|
||||
Pygments==2.9.0 # TODO: Upgrade Pygments, new version causes an error on posting a code block
|
||||
Pygments
|
||||
pyotp
|
||||
pyramid<2.0
|
||||
pyramid-ipython
|
||||
|
||||
@@ -55,7 +55,7 @@ publicsuffix2==2.20160818
|
||||
pure-eval==0.2.3
|
||||
pycparser==2.22
|
||||
pygit2==1.18.1
|
||||
pygments==2.9.0
|
||||
pygments==2.19.2
|
||||
pyotp==2.9.0
|
||||
pyproject-hooks==1.2.0
|
||||
pyramid==1.10.8
|
||||
|
||||
@@ -255,12 +255,15 @@ class CodeHtmlFormatter(HtmlFormatter):
|
||||
<code class="highlight">...</code> instead (assumes a <pre> is already present).
|
||||
"""
|
||||
|
||||
def wrap(self, source: Any, outfile: Any) -> Iterator[tuple[int, str]]:
|
||||
def wrap(self, source: Any) -> Iterator[tuple[int, str]]:
|
||||
"""Wrap the highlighted tokens with the <code> tag."""
|
||||
# pylint: disable=unused-argument
|
||||
yield (0, '<code class="highlight">')
|
||||
yield 0, '<code class="highlight">'
|
||||
yield from source
|
||||
yield (0, "</code>")
|
||||
yield 0, "</code>"
|
||||
|
||||
def _wrap_div(self, inner: Any) -> Iterator[tuple[int, str]]:
|
||||
"""Override HtmlFormatter to omit the wrapping <div class="highlight">."""
|
||||
yield from inner
|
||||
|
||||
|
||||
def apply_syntax_highlighting(html: str) -> str:
|
||||
|
||||
Reference in New Issue
Block a user