Commits

Georg Brandl committed c4b266b

Closes #647: Do not apply SmartyPants in parsed-literal blocks.

Comments (0)

Files changed (2)

 Release 1.0.8 (in development)
 ==============================
 
+* #647: Do not apply SmartyPants in parsed-literal blocks.
+
 
 Release 1.0.7 (Jan 15, 2011)
 ============================

sphinx/writers/html.py

         self.no_smarty += 1
         try:
             HTMLTranslator.visit_literal_block(self, node)
-        finally:
+        except nodes.SkipNode:
+            # HTMLTranslator raises SkipNode for simple literal blocks,
+            # but not for parsed literal blocks
             self.no_smarty -= 1
+            raise
+
+    def depart_literal_block(self, node):
+        HTMLTranslator.depart_literal_block(self, node)
+        self.no_smarty -= 1
 
     def visit_literal_emphasis(self, node):
         self.no_smarty += 1