summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlbert Krewinkel <albert@zeitkraut.de>2023-03-14 07:16:18 +0100
committerAlbert Krewinkel <albert@zeitkraut.de>2023-03-14 07:22:11 +0100
commiteffca7f7cf7afeb381154f77e33a16b7b19c02b7 (patch)
tree0b882954fbf4cf94504ceb0e2bf82e40f9f6c016 /src
parent32e351ba8bfe159233acd69e6ac2f51baa5bcb1d (diff)
Markdown writer: use implicit figures if there's a caption but no alt.
Closes: #8689
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Writers/Markdown.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/Markdown.hs b/src/Text/Pandoc/Writers/Markdown.hs
index 6822c6c1a..43b2e7d5b 100644
--- a/src/Text/Pandoc/Writers/Markdown.hs
+++ b/src/Text/Pandoc/Writers/Markdown.hs
@@ -677,7 +677,7 @@ blockToMarkdown' opts (Figure figattr capt body) = do
then Just [Str "image"]
else Just alt
Caption Nothing [Plain captInlines]
- | captInlines == alt -> Just captInlines
+ | captInlines == alt || null alt -> Just captInlines
_ -> Nothing
case body of
[Plain [Image imgAttr alt (src, ttl)]]