From f75630b4bb4822b98e85db044b907a7a3a161d4f Mon Sep 17 00:00:00 2001 From: Waylan Limberg Date: Mon, 8 Oct 2007 16:49:38 +0000 Subject: Empty inline image link - fixed [1799251] --- markdown.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/markdown.py b/markdown.py index cb90171..1e8a56f 100644 --- a/markdown.py +++ b/markdown.py @@ -767,7 +767,10 @@ class ImagePattern (Pattern): def handleMatch(self, m, doc): el = doc.createElement('img') src_parts = m.group(9).split() - el.setAttribute('src', src_parts[0]) + if src_parts : + el.setAttribute('src', src_parts[0]) + else: + el.setAttribute('src', "") if len(src_parts) > 1 : el.setAttribute('title', dequote(" ".join(src_parts[1:]))) if ENABLE_ATTRIBUTES : -- cgit v1.2.3