aboutsummaryrefslogtreecommitdiff
path: root/src/Text
diff options
context:
space:
mode:
Diffstat (limited to 'src/Text')
-rw-r--r--src/Text/Pandoc/Writers/Ms.hs7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/Text/Pandoc/Writers/Ms.hs b/src/Text/Pandoc/Writers/Ms.hs
index aadbd208e..4118a7bfb 100644
--- a/src/Text/Pandoc/Writers/Ms.hs
+++ b/src/Text/Pandoc/Writers/Ms.hs
@@ -516,10 +516,9 @@ inlineToMs opts (Link _ txt (src, _)) = do
doubleQuotes (text (escapeUri src)) <> text " -A " <>
doubleQuotes (text "\\c") <> space <> text "\\") <> cr <>
text " -- " <> doubleQuotes (nowrap contents) <> cr <> text "\\&"
-inlineToMs opts (Image attr alternate (source, tit)) = do
- let alt = if null alternate then [Str "image"] else alternate
- linkPart <- inlineToMs opts (Link attr alt (source, tit))
- return $ char '[' <> text "IMAGE: " <> linkPart <> char ']'
+inlineToMs _ (Image _ alternate (_, _)) =
+ return $ char '[' <> text "IMAGE: " <>
+ text (escapeString (stringify alternate)) <> char ']'
inlineToMs _ (Note contents) = do
modify $ \st -> st{ stNotes = contents : stNotes st }
return $ text "\\**"