aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authorAlbert Krewinkel <albert@zeitkraut.de>2016-08-18 14:32:59 +0200
committerAlbert Krewinkel <albert@zeitkraut.de>2016-08-18 14:32:59 +0200
commit91afa513ad495bdc277c94ac2a4a4b829423f222 (patch)
tree08855ab2f2c006db0e7960d86d34f3f4191e50c1 /src/Text/Pandoc
parent3a44ee62c064428b57c64de750ac9ae27bc930cf (diff)
downloadpandoc-91afa513ad495bdc277c94ac2a4a4b829423f222.tar.gz
Org writer: remove blank line after figure caption
Org-mode only treats an image as a figure if it is directly preceded by a caption.
Diffstat (limited to 'src/Text/Pandoc')
-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