summaryrefslogtreecommitdiff
path: root/external/rst-directive.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2014-01-18 16:44:49 +0100
committerGeorg Brandl <georg@python.org>2014-01-18 16:44:49 +0100
commit97703d63f39e6086d497a6a749c9eee3293dcbeb (patch)
treec970bf2a7bc17aa7053f3621e299a01fb9695342 /external/rst-directive.py
parent5500fd3a6d0c5ece01826606fcf2d684407b9cc6 (diff)
downloadpygments-97703d63f39e6086d497a6a749c9eee3293dcbeb.tar.gz
Finalize single-source port for Py2.[67] and Py3.3+.
Diffstat (limited to 'external/rst-directive.py')
-rw-r--r--external/rst-directive.py3
1 files changed, 1 insertions, 2 deletions
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)
-