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:
parent
ea6d0cf5b5
commit
5a8f5cefdd
17 changed files with 102 additions and 1 deletions
|
|
@ -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')]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue