git.iko.soy/typeable/pandoc
on master help sign in
Org writer: ensure blank line after figure

An Org-mode figure should be surrounded by blank lines. The figure would be recognized regardless, but images in the following line would unintentionally be treated as figures as well.

commitd6694256404973a3a7675b97261e7a1914e8f059 authorAlbert Krewinkel <albert@zeitkraut.de> dateThu 18 Aug 2016, 14:32 (10 years ago) parent91afa51
2 files changed+2−1
src/Text/Pandoc/Writers/Org.hs+1−1 tests/writer.org+1
src/Text/Pandoc/Writers/Org.hs+1−1
@@ -160,7 +160,7 @@ blockToOrg (Para [Image attr txt (src,'f':'i':'g':':':tit)]) = do
160160 then return empty
161161 else ("#+CAPTION: " <>) `fmap` inlineListToOrg txt
162162 img <- inlineToOrg (Image attr txt (src,tit))
163− return $ capt $$ img
163+ return $ capt $$ img $$ blankline
164164blockToOrg (Para inlines) = do
165165 contents <- inlineListToOrg inlines
166166 return $ contents <> blankline
tests/writer.org+1
@@ -809,6 +809,7 @@ From "Voyage dans la Lune" by Georges Melies (1902):
809809
810810#+CAPTION: lalune
811811[[lalune.jpg]]
812+
812813Here is a movie [[movie.jpg]] icon.
813814
814815--------------