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

This commit is contained in:
Georg Brandl 2011-05-15 11:34:52 +02:00
parent b57286ca6c
commit dfe70cb7f2
2 changed files with 10 additions and 1 deletions

View File

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

View File

@ -531,8 +531,15 @@ class SmartyPantsHTMLTranslator(HTMLTranslator):
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