diff options
author | Waylan Limberg <waylan@gmail.com> | 2012-11-01 08:18:12 -0400 |
---|---|---|
committer | Waylan Limberg <waylan@gmail.com> | 2012-11-01 08:18:12 -0400 |
commit | bb429db7e2dd22711e3a3c583395bd525b7c8358 (patch) | |
tree | 9c3a27450445e34914d47060c62c643dcac306ea | |
parent | d78b7a0da4a5662a333954fe18688c2448600316 (diff) | |
download | markdown-bb429db7e2dd22711e3a3c583395bd525b7c8358.tar.gz markdown-bb429db7e2dd22711e3a3c583395bd525b7c8358.tar.bz2 markdown-bb429db7e2dd22711e3a3c583395bd525b7c8358.zip |
Fixed #155. Early unescaping of inline placeholders now works when the placeholder is an Elementtree Element.
-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) |