mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Convert strings to unicode in highlighting.
This commit is contained in:
parent
770f716fc0
commit
ab07eba895
@ -158,6 +158,8 @@ class PygmentsBridge(object):
|
||||
return True
|
||||
|
||||
def highlight_block(self, source, lang, linenos=False):
|
||||
if isinstance(source, str):
|
||||
source = source.decode()
|
||||
if not pygments:
|
||||
return self.unhighlighted(source)
|
||||
if lang in ('py', 'python'):
|
||||
|
Loading…
Reference in New Issue
Block a user