summaryrefslogtreecommitdiff
path: root/sphinx/highlighting.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2011-09-22 09:29:36 +0200
committerGeorg Brandl <georg@python.org>2011-09-22 09:29:36 +0200
commitad5d9f7c6b35fb0cf7d76d9a0501c20d91bd342b (patch)
tree3bc1417253025dfff8112252d782b2133377da64 /sphinx/highlighting.py
parent5373125fc6a06228cc690bc603e99b3ebd89442d (diff)
downloadsphinx-git-ad5d9f7c6b35fb0cf7d76d9a0501c20d91bd342b.tar.gz
Add changelog entry for emphasize-lines and some coding style fixes.
Diffstat (limited to 'sphinx/highlighting.py')
-rw-r--r--sphinx/highlighting.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/sphinx/highlighting.py b/sphinx/highlighting.py
index 65fe9f7d3..0912ee053 100644
--- a/sphinx/highlighting.py
+++ b/sphinx/highlighting.py
@@ -101,6 +101,10 @@ class PygmentsBridge(object):
self.formatter = self.latex_formatter
self.formatter_args['commandprefix'] = 'PYG'
+ def get_formatter(self, **kwargs):
+ kwargs.update(self.formatter_args)
+ return self.formatter(**kwargs)
+
def unhighlighted(self, source):
if self.dest == 'html':
return '<pre>' + cgi.escape(source) + '</pre>\n'
@@ -212,11 +216,6 @@ class PygmentsBridge(object):
# so let it pass unhighlighted
return self.unhighlighted(source)
- def get_formatter(self, **kwargs_orig):
- kwargs = self.formatter_args.copy()
- kwargs.update(kwargs_orig)
- return self.formatter(**kwargs)
-
def get_stylesheet(self):
if not pygments:
if self.dest == 'latex':