mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Closes #647: Do not apply SmartyPants in parsed-literal blocks.
This commit is contained in:
parent
b57286ca6c
commit
dfe70cb7f2
2
CHANGES
2
CHANGES
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user