From 265766721eb1cb7cf7b574c1e921355e99a83e3a Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Fri, 29 Feb 2008 18:19:13 +0000 Subject: [PATCH] #2207: fix if no Pygments available. --- sphinx/ext/refcounting.py | 3 +++ sphinx/highlighting.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/sphinx/ext/refcounting.py b/sphinx/ext/refcounting.py index 9bcd3cdf3..c6e5a76fc 100644 --- a/sphinx/ext/refcounting.py +++ b/sphinx/ext/refcounting.py @@ -6,6 +6,9 @@ Supports reference count annotations for C API functions. Based on refcount.py and anno-api.py in the old Python documentation tools. + Usage: Set the `refcount_file` config value to the path to the reference + count data file. + :copyright: 2008 by Georg Brandl. :license: BSD. """ diff --git a/sphinx/highlighting.py b/sphinx/highlighting.py index 78e930645..bc7ad966a 100644 --- a/sphinx/highlighting.py +++ b/sphinx/highlighting.py @@ -67,9 +67,9 @@ def escape_tex(text): class PygmentsBridge(object): def __init__(self, dest='html', stylename='sphinx'): + self.dest = dest if not pygments: return - self.dest = dest if stylename == 'sphinx': style = SphinxStyle else: