mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2026-09-03 20:52:55 -05:00
pygments_style can be a style class now
This commit is contained in:
@@ -87,8 +87,10 @@ class PygmentsBridge(object):
|
|||||||
return
|
return
|
||||||
if stylename == 'sphinx':
|
if stylename == 'sphinx':
|
||||||
style = SphinxStyle
|
style = SphinxStyle
|
||||||
else:
|
elif isinstance(stylename, basestring):
|
||||||
style = get_style_by_name(stylename)
|
style = get_style_by_name(stylename)
|
||||||
|
else:
|
||||||
|
style = stylename
|
||||||
self.hfmter = {False: HtmlFormatter(style=style),
|
self.hfmter = {False: HtmlFormatter(style=style),
|
||||||
True: HtmlFormatter(style=style, linenos=True)}
|
True: HtmlFormatter(style=style, linenos=True)}
|
||||||
self.lfmter = {False: LatexFormatter(style=style),
|
self.lfmter = {False: LatexFormatter(style=style),
|
||||||
|
|||||||
Reference in New Issue
Block a user