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.
This commit is contained in:
Albert Krewinkel 2016-08-18 14:32:59 +02:00
parent 3a44ee62c0
commit 91afa513ad
No known key found for this signature in database
GPG key ID: 388DC0B21F631124
2 changed files with 2 additions and 4 deletions

View file

@ -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

View file

@ -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.