From bb429db7e2dd22711e3a3c583395bd525b7c8358 Mon Sep 17 00:00:00 2001 From: Waylan Limberg Date: Thu, 1 Nov 2012 08:18:12 -0400 Subject: Fixed #155. Early unescaping of inline placeholders now works when the placeholder is an Elementtree Element. --- markdown/inlinepatterns.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/markdown/inlinepatterns.py b/markdown/inlinepatterns.py index 6ec58c4..17bc3c4 100644 --- a/markdown/inlinepatterns.py +++ b/markdown/inlinepatterns.py @@ -192,7 +192,11 @@ class Pattern: def get_stash(m): id = m.group(1) if id in stash: - return stash.get(id) + text = stash.get(id) + if isinstance(text, basestring): + return text + else: + return self.markdown.serializer(text) return util.INLINE_PLACEHOLDER_RE.sub(get_stash, text) -- cgit v1.2.3