summaryrefslogtreecommitdiff
path: root/sphinx/highlighting.py
diff options
context:
space:
mode:
Diffstat (limited to 'sphinx/highlighting.py')
-rw-r--r--sphinx/highlighting.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/sphinx/highlighting.py b/sphinx/highlighting.py
index 2f61c1ef1..63464914a 100644
--- a/sphinx/highlighting.py
+++ b/sphinx/highlighting.py
@@ -207,6 +207,8 @@ class PygmentsBridge(object):
if self.dest == 'html':
return hlsource
else:
+ if not isinstance(hlsource, unicode): # Py2 / Pygments < 1.6
+ hlsource = hlsource.decode()
return hlsource.translate(tex_hl_escape_map_new)
except ErrorToken:
# this is most probably not the selected language,