aboutsummaryrefslogtreecommitdiffstats
path: root/markdown.py
diff options
context:
space:
mode:
Diffstat (limited to 'markdown.py')
-rw-r--r--markdown.py5
1 files changed, 4 insertions, 1 deletions
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 :