Kaydet (Commit) ecb5f4c6 authored tarafından Jacob Kaplan-Moss's avatar Jacob Kaplan-Moss

Fixed the documentation HTML writer to not apply smartypants to literal blocks.…

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
üst b13276b1
......@@ -89,6 +89,17 @@ class DjangoHTMLTranslator(sphinx.htmlwriter.SmartyPantsHTMLTranslator):
self.body.append(')')
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
# better callout -- the Sphinx default is just a little span,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment