diff options
| author | Waylan Limberg <waylan@gmail.com> | 2012-01-19 06:13:21 -0500 |
|---|---|---|
| committer | Waylan Limberg <waylan@gmail.com> | 2012-01-19 06:13:21 -0500 |
| commit | e3c5efd182d9a80f34e3b9a770eed63c1d62b2f9 (patch) | |
| tree | 077c4203b0ad851c62e839b86df5d1ead70c0579 /markdown/inlinepatterns.py | |
| parent | 481e50700e269f9a56337cd9fabc3b5251958d10 (diff) | |
| download | python-markdown-e3c5efd182d9a80f34e3b9a770eed63c1d62b2f9.tar.gz | |
Partial fix for issue introduced in fix for #59
Markdown markup inside angle bracktes now gets rendered properly
in all cases except when safe_mode='escape'. Also added tests.
Diffstat (limited to 'markdown/inlinepatterns.py')
| -rw-r--r-- | markdown/inlinepatterns.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/markdown/inlinepatterns.py b/markdown/inlinepatterns.py index 2a33816..3f92737 100644 --- a/markdown/inlinepatterns.py +++ b/markdown/inlinepatterns.py @@ -280,8 +280,13 @@ class HtmlPattern(Pattern): return text def get_stash(m): id = m.group(1) - if id in stash: - return '\%s' % stash.get(id) + value = stash.get(id) + if value is not None: + try: + return util.etree.tostring(value) + except: + return '\%s' % value + return util.INLINE_PLACEHOLDER_RE.sub(get_stash, text) |
