From d6494f9fe0d2265167295c4d813173945fd505cf Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sun, 8 Feb 2015 20:37:45 +0000 Subject: Handle image elements with no alt text 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 4aa73d5..6db4ea9 100644 --- a/mammoth/writers/markdown.py +++ b/mammoth/writers/markdown.py @@ -36,7 +36,7 @@ def _hyperlink(attributes): def _image(attributes): src = attributes.get("src") - alt_text = attributes.get("alt") + alt_text = attributes.get("alt", "") return _WriterOutput("![{0}]({1})".format(alt_text, src), "") -- cgit v1.2.3