From f4a3ee2eafdf90a2c56161bb4141c3cc19506876 Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Mon, 28 Apr 2008 12:41:02 +0000 Subject: [PATCH] pygments_style can be a style class now --- sphinx/highlighting.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sphinx/highlighting.py b/sphinx/highlighting.py index 0da8a61df0..ba50917352 100644 --- a/sphinx/highlighting.py +++ b/sphinx/highlighting.py @@ -87,8 +87,10 @@ class PygmentsBridge(object): 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),