From 97703d63f39e6086d497a6a749c9eee3293dcbeb Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sat, 18 Jan 2014 16:44:49 +0100 Subject: Finalize single-source port for Py2.[67] and Py3.3+. --- external/rst-directive.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'external/rst-directive.py') diff --git a/external/rst-directive.py b/external/rst-directive.py index f15e7dc8..8ce150c4 100644 --- a/external/rst-directive.py +++ b/external/rst-directive.py @@ -75,9 +75,8 @@ 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]] or DEFAULT + formatter = self.options and VARIANTS[list(self.options)[0]] or DEFAULT parsed = highlight(u'\n'.join(self.content), lexer, formatter) return [nodes.raw('', parsed, format='html')] directives.register_directive('sourcecode', Pygments) - -- cgit v1.2.1