mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2026-09-03 20:52:55 -05:00
Closes #647: Do not apply SmartyPants in parsed-literal blocks.
This commit is contained in:
@@ -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)
|
||||
============================
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user