Fixed the documentation HTML writer to not apply smartypants to literal blocks. Fixes #8696; thanks, ramiro.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8875 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
b13276b1ff
commit
ecb5f4c693
|
@ -89,6 +89,17 @@ class DjangoHTMLTranslator(sphinx.htmlwriter.SmartyPantsHTMLTranslator):
|
||||||
self.body.append(')')
|
self.body.append(')')
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
#
|
||||||
|
# Don't apply smartypants to literal blocks
|
||||||
|
#
|
||||||
|
def visit_literal_block(self, node):
|
||||||
|
self.no_smarty += 1
|
||||||
|
sphinx.htmlwriter.SmartyPantsHTMLTranslator.visit_literal_block(self, node)
|
||||||
|
|
||||||
|
def depart_literal_block(self, node):
|
||||||
|
sphinx.htmlwriter.SmartyPantsHTMLTranslator.depart_literal_block(self, node)
|
||||||
|
self.no_smarty -= 1
|
||||||
|
|
||||||
#
|
#
|
||||||
# Turn the "new in version" stuff (versoinadded/versionchanged) into a
|
# Turn the "new in version" stuff (versoinadded/versionchanged) into a
|
||||||
# better callout -- the Sphinx default is just a little span,
|
# better callout -- the Sphinx default is just a little span,
|
||||||
|
|
Loading…
Reference in New Issue