1
0
Fork 0
forked from github/pelican

fix py3 support for sourcecode directive

added sourcecode to the functional test so it's tested *somewhere*.
fixes #963
This commit is contained in:
Russ Webber 2013-08-04 16:39:07 +08:00
commit 5a8f5cefdd
17 changed files with 102 additions and 1 deletions

View file

@ -32,7 +32,7 @@ class Pygments(Directive):
# no lexer found - use the text one instead of an exception
lexer = TextLexer()
# take an arbitrary option if more than one is given
formatter = self.options and VARIANTS[self.options.keys()[0]] \
formatter = self.options and VARIANTS[list(self.options.keys())[0]] \
or DEFAULT
parsed = highlight('\n'.join(self.content), lexer, formatter)
return [nodes.raw('', parsed, format='html')]