mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix NameError if Pygments is not installed.
This commit is contained in:
parent
711a1fa7ed
commit
3531bf6afa
@ -31,6 +31,7 @@ try:
|
||||
except ImportError:
|
||||
pygments = None
|
||||
lexers = None
|
||||
HtmlFormatter = LatexFormatter = None
|
||||
else:
|
||||
class SphinxStyle(Style):
|
||||
"""
|
||||
@ -87,7 +88,7 @@ class PygmentsBridge(object):
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user