aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Text/Pandoc/Writers/Org.hs5
-rw-r--r--tests/writer.org1
2 files changed, 2 insertions, 4 deletions
diff --git a/src/Text/Pandoc/Writers/Org.hs b/src/Text/Pandoc/Writers/Org.hs
index e903e9e42..283bb7d9c 100644
--- a/src/Text/Pandoc/Writers/Org.hs
+++ b/src/Text/Pandoc/Writers/Org.hs
@@ -158,10 +158,9 @@ blockToOrg (Plain inlines) = inlineListToOrg inlines
blockToOrg (Para [Image attr txt (src,'f':'i':'g':':':tit)]) = do
capt <- if null txt
then return empty
- else (\c -> "#+CAPTION: " <> c <> blankline) `fmap`
- inlineListToOrg txt
+ else ("#+CAPTION: " <>) `fmap` inlineListToOrg txt
img <- inlineToOrg (Image attr txt (src,tit))
- return $ capt <> img
+ return $ capt $$ img
blockToOrg (Para inlines) = do
contents <- inlineListToOrg inlines
return $ contents <> blankline
diff --git a/tests/writer.org b/tests/writer.org
index cf6305ec9..100328c2c 100644
--- a/tests/writer.org
+++ b/tests/writer.org
@@ -808,7 +808,6 @@ Auto-links should not occur here: =<http://example.com/>=
From "Voyage dans la Lune" by Georges Melies (1902):
#+CAPTION: lalune
-
[[lalune.jpg]]
Here is a movie [[movie.jpg]] icon.