More version-compatibility hack removals.

This commit is contained in:
Georg Brandl 2011-09-25 08:47:56 +02:00
parent fa10e813e3
commit c2ceb79881
3 changed files with 1 additions and 10 deletions

View File

@ -44,8 +44,6 @@ else:
none = TextLexer(), none = TextLexer(),
python = PythonLexer(), python = PythonLexer(),
pycon = PythonConsoleLexer(), 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), pycon3 = PythonConsoleLexer(python3=True),
rest = RstLexer(), rest = RstLexer(),
c = CLexer(), c = CLexer(),
@ -223,8 +221,4 @@ class PygmentsBridge(object):
if self.dest == 'html': if self.dest == 'html':
return formatter.get_style_defs('.highlight') return formatter.get_style_defs('.highlight')
else: else:
styledefs = formatter.get_style_defs() return formatter.get_style_defs()
# workaround for Pygments < 0.12
if styledefs.startswith('\\newcommand\\at{@}'):
styledefs += _LATEX_STYLES
return styledefs

View File

@ -11,7 +11,6 @@
from docutils import nodes from docutils import nodes
# function missing in docutils 0.5
def make_admonition(node_class, name, arguments, options, content, lineno, def make_admonition(node_class, name, arguments, options, content, lineno,
content_offset, block_text, state, state_machine): content_offset, block_text, state, state_machine):
#if not content: #if not content:

View File

@ -428,8 +428,6 @@ class HTMLTranslator(BaseTranslator):
encoded = self.bulk_text_processor(encoded) encoded = self.bulk_text_processor(encoded)
self.body.append(encoded) self.body.append(encoded)
# these are all for docutils 0.5 compatibility
def visit_note(self, node): def visit_note(self, node):
self.visit_admonition(node, 'note') self.visit_admonition(node, 'note')
def depart_note(self, node): def depart_note(self, node):