summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2011-09-25 08:47:56 +0200
committerGeorg Brandl <georg@python.org>2011-09-25 08:47:56 +0200
commitdaf558d77006a981774e3c7173761b79689e3411 (patch)
tree1965bc11eb89320dede9bffec0fc5515825b6ca9
parentedbbd609bdfb24145672501f981e5abd3c825400 (diff)
downloadsphinx-daf558d77006a981774e3c7173761b79689e3411.tar.gz
More version-compatibility hack removals.
-rw-r--r--sphinx/highlighting.py8
-rw-r--r--sphinx/util/compat.py1
-rw-r--r--sphinx/writers/html.py2
3 files changed, 1 insertions, 10 deletions
diff --git a/sphinx/highlighting.py b/sphinx/highlighting.py
index 25a777ef..bf21ac64 100644
--- a/sphinx/highlighting.py
+++ b/sphinx/highlighting.py
@@ -44,8 +44,6 @@ else:
none = TextLexer(),
python = PythonLexer(),
pycon = PythonConsoleLexer(),
- # the python3 option exists as of Pygments 1.0,
- # but it doesn't do any harm in previous versions
pycon3 = PythonConsoleLexer(python3=True),
rest = RstLexer(),
c = CLexer(),
@@ -223,8 +221,4 @@ class PygmentsBridge(object):
if self.dest == 'html':
return formatter.get_style_defs('.highlight')
else:
- styledefs = formatter.get_style_defs()
- # workaround for Pygments < 0.12
- if styledefs.startswith('\\newcommand\\at{@}'):
- styledefs += _LATEX_STYLES
- return styledefs
+ return formatter.get_style_defs()
diff --git a/sphinx/util/compat.py b/sphinx/util/compat.py
index 1a263cff..bdb00845 100644
--- a/sphinx/util/compat.py
+++ b/sphinx/util/compat.py
@@ -11,7 +11,6 @@
from docutils import nodes
-# function missing in docutils 0.5
def make_admonition(node_class, name, arguments, options, content, lineno,
content_offset, block_text, state, state_machine):
#if not content:
diff --git a/sphinx/writers/html.py b/sphinx/writers/html.py
index 7872dabe..787b3105 100644
--- a/sphinx/writers/html.py
+++ b/sphinx/writers/html.py
@@ -428,8 +428,6 @@ class HTMLTranslator(BaseTranslator):
encoded = self.bulk_text_processor(encoded)
self.body.append(encoded)
- # these are all for docutils 0.5 compatibility
-
def visit_note(self, node):
self.visit_admonition(node, 'note')
def depart_note(self, node):