diff options
-rw-r--r-- | markdown/inlinepatterns.py | 6 |
1 files changed, 5 insertions, 1 deletions
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) |