git.iko.soy/typeable/pandoc
on master help sign in
Org writer: remove blank line after figure caption
91afa51Albert Krewinkel
src/Text/Pandoc/Writers/Org.hs+2−3
@@ -158,10 +158,9 @@ blockToOrg (Plain inlines) = inlineListToOrg inlines
158blockToOrg (Para [Image attr txt (src,'f':'i':'g':':':tit)]) = do
158blockToOrg (Para [Image attr txt (src,'f':'i':'g':':':tit)]) = do
159 capt <- if null txt
159 capt <- if null txt
160 then return empty
160 then return empty
161− else (\c -> "#+CAPTION: " <> c <> blankline) `fmap`
162− inlineListToOrg txt
161+ else ("#+CAPTION: " <>) `fmap` inlineListToOrg txt
163 img <- inlineToOrg (Image attr txt (src,tit))
162 img <- inlineToOrg (Image attr txt (src,tit))
164− return $ capt <> img
163+ return $ capt $$ img
165blockToOrg (Para inlines) = do
164blockToOrg (Para inlines) = do
166 contents <- inlineListToOrg inlines
165 contents <- inlineListToOrg inlines
167 return $ contents <> blankline
166 return $ contents <> blankline
tests/writer.org−1
@@ -808,7 +808,6 @@ Auto-links should not occur here: =<http://example.com/>=
808From "Voyage dans la Lune" by Georges Melies (1902):
808From "Voyage dans la Lune" by Georges Melies (1902):
809
809
810#+CAPTION: lalune
810#+CAPTION: lalune
811−
812[[lalune.jpg]]
811[[lalune.jpg]]
813Here is a movie [[movie.jpg]] icon.
812Here is a movie [[movie.jpg]] icon.
814
813