[Python-checkins] r62560 - doctools/trunk/sphinx/highlighting.py

armin.ronacher python-checkins at python.org
Mon Apr 28 14:41:03 CEST 2008


Author: armin.ronacher
Date: Mon Apr 28 14:41:02 2008
New Revision: 62560

Log:
pygments_style can be a style class now



Modified:
   doctools/trunk/sphinx/highlighting.py

Modified: doctools/trunk/sphinx/highlighting.py
==============================================================================
--- doctools/trunk/sphinx/highlighting.py	(original)
+++ doctools/trunk/sphinx/highlighting.py	Mon Apr 28 14:41:02 2008
@@ -87,8 +87,10 @@
             return
         if stylename == 'sphinx':
             style = SphinxStyle
-        else:
+        elif isinstance(stylename, basestring):
             style = get_style_by_name(stylename)
+        else:
+            style = stylename
         self.hfmter = {False: HtmlFormatter(style=style),
                        True: HtmlFormatter(style=style, linenos=True)}
         self.lfmter = {False: LatexFormatter(style=style),


More information about the Python-checkins mailing list