Convert strings to unicode in highlighting.

This commit is contained in:
Georg Brandl 2009-04-28 23:14:29 +02:00
parent 770f716fc0
commit ab07eba895

View File

@ -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'):