From 1306c6f7be83f7b5c8b26bf022e197cdc669250d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Mon, 10 Aug 2020 16:28:21 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20Fix=20docs=20build=20against=20S?= =?UTF-8?q?phinx=203.2.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/sphinxext/codeblockext.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/docs/sphinxext/codeblockext.py b/docs/sphinxext/codeblockext.py index 24913f1ce..f36c16a33 100644 --- a/docs/sphinxext/codeblockext.py +++ b/docs/sphinxext/codeblockext.py @@ -8,9 +8,7 @@ __copyright__ = "Copyright (C) 2015 Gina Häußge - Released under terms of the from sphinx.directives.code import CodeBlock import sphinx.highlighting -from sphinx.highlighting import PygmentsBridge from sphinx.ext import doctest -from sphinx.util.texescape import tex_hl_escape_map_new from docutils import nodes from docutils.parsers.rst import directives @@ -207,13 +205,7 @@ class PygmentsBridgeExt(object): with whitespace(sphinx.highlighting.lexers["none"]) as l: hlsource = highlight(source, l, formatter) # /MODIFIED - if self._bridge.dest == 'html': - return hlsource - else: - if not isinstance(hlsource, text_type): # Py2 / Pygments < 1.6 - hlsource = hlsource.decode() - return hlsource.translate(tex_hl_escape_map_new) - + return hlsource class whitespace_highlighter(object): """