aboutsummaryrefslogtreecommitdiffstats
path: root/markdown/extensions/smarty.py
diff options
context:
space:
mode:
Diffstat (limited to 'markdown/extensions/smarty.py')
-rw-r--r--markdown/extensions/smarty.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/markdown/extensions/smarty.py b/markdown/extensions/smarty.py
index d25620b..c57d835 100644
--- a/markdown/extensions/smarty.py
+++ b/markdown/extensions/smarty.py
@@ -85,7 +85,7 @@ from __future__ import unicode_literals
from . import Extension
from ..inlinepatterns import HtmlInlineProcessor, HTML_RE
from ..treeprocessors import InlineProcessor
-from ..util import Registry
+from ..util import Registry, deprecated
# Constants for quote education.
@@ -151,11 +151,17 @@ HTML_STRICT_RE = HTML_RE + r'(?!\>)'
class SubstituteTextPattern(HtmlInlineProcessor):
- def __init__(self, pattern, replace, markdown_instance):
+ def __init__(self, pattern, replace, md):
""" Replaces matches with some text. """
HtmlInlineProcessor.__init__(self, pattern)
self.replace = replace
- self.markdown = markdown_instance
+ self.md = md
+
+ @property
+ @deprecated("Use 'md' instead.")
+ def markdown(self):
+ # TODO: remove this later
+ return self.md
def handleMatch(self, m, data):
result = ''
@@ -163,7 +169,7 @@ class SubstituteTextPattern(HtmlInlineProcessor):
if isinstance(part, int):
result += m.group(part)
else:
- result += self.markdown.htmlStash.store(part)
+ result += self.md.htmlStash.store(part)
return result, m.start(0), m.end(0)