From a098466259ce25c82f5c5faa5b2dcd3b9c8f90d6 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sun, 8 Feb 2015 20:39:42 +0000 Subject: Handle image elements with no src in markdown writer --- mammoth/writers/markdown.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mammoth') diff --git a/mammoth/writers/markdown.py b/mammoth/writers/markdown.py index 6db4ea9..5e3cf00 100644 --- a/mammoth/writers/markdown.py +++ b/mammoth/writers/markdown.py @@ -35,7 +35,7 @@ def _hyperlink(attributes): def _image(attributes): - src = attributes.get("src") + src = attributes.get("src", "") alt_text = attributes.get("alt", "") return _WriterOutput("![{0}]({1})".format(alt_text, src), "") -- cgit v1.2.3