aboutsummaryrefslogtreecommitdiff
path: root/src/Text
diff options
context:
space:
mode:
Diffstat (limited to 'src/Text')
-rw-r--r--src/Text/Pandoc/Writers/Org.hs5
1 files changed, 2 insertions, 3 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