Skip to content

Commit

Permalink
[1.8.x] Removed a docs workaround for an old Sphinx version.
Browse files Browse the repository at this point in the history
Backport of c315f96 from master
  • Loading branch information
timgraham committed May 24, 2017
1 parent 8aee493 commit 7dc480e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 deletions.
14 changes: 1 addition & 13 deletions docs/_ext/djangodocs.py
Expand Up @@ -7,7 +7,7 @@

from docutils import nodes
from docutils.parsers.rst import Directive, directives
from sphinx import __version__ as sphinx_ver, addnodes
from sphinx import addnodes
from sphinx.builders.html import StandaloneHTMLBuilder
from sphinx.util.console import bold
from sphinx.util.nodes import set_source_info
Expand Down Expand Up @@ -256,18 +256,6 @@ def visit_desc_parameterlist(self, node):
def depart_desc_parameterlist(self, node):
self.body.append(')')

if sphinx_ver < '1.0.8':
#
# Don't apply smartypants to literal blocks
#
def visit_literal_block(self, node):
self.no_smarty += 1
SmartyPantsHTMLTranslator.visit_literal_block(self, node)

def depart_literal_block(self, node):
SmartyPantsHTMLTranslator.depart_literal_block(self, node)
self.no_smarty -= 1

#
# Turn the "new in version" stuff (versionadded/versionchanged) into a
# better callout -- the Sphinx default is just a little span,
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Expand Up @@ -36,7 +36,7 @@
# -- General configuration -----------------------------------------------------

# If your documentation needs a minimal Sphinx version, state it here.
needs_sphinx = '1.0'
needs_sphinx = '1.0.8'

# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
Expand Down

0 comments on commit 7dc480e

Please sign in to comment.