Commits

Georg Brandl committed ce3473e

Fix NameError if Pygments is not installed.

  • Participants
  • Parent commits 268b1ef

Comments (0)

Files changed (1)

File sphinx/highlighting.py

 except ImportError:
     pygments = None
     lexers = None
+    HtmlFormatter = LatexFormatter = None
 else:
     class SphinxStyle(Style):
         """
     html_formatter = HtmlFormatter
     latex_formatter = LatexFormatter
 
-    def __init__(self, dest='html', stylename='sphinx', ):
+    def __init__(self, dest='html', stylename='sphinx'):
         self.dest = dest
         if not pygments:
             return