Author: jacob
Date: 2008-09-02 14:49:23 -0500 (Tue, 02 Sep 2008)
New Revision: 8875

Modified:
   django/trunk/docs/_ext/djangodocs.py
Log:
Fixed the documentation HTML writer to not apply smartypants to literal blocks. 
Fixes #8696; thanks, ramiro.

Modified: django/trunk/docs/_ext/djangodocs.py
===================================================================
--- django/trunk/docs/_ext/djangodocs.py        2008-09-02 19:45:06 UTC (rev 
8874)
+++ django/trunk/docs/_ext/djangodocs.py        2008-09-02 19:49:23 UTC (rev 
8875)
@@ -90,6 +90,17 @@
         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,
     # which is a bit less obvious that I'd like.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to