diff options
author | Albert Krewinkel <albert@zeitkraut.de> | 2016-08-18 14:32:59 +0200 |
---|---|---|
committer | Albert Krewinkel <albert@zeitkraut.de> | 2016-08-18 14:32:59 +0200 |
commit | d6694256404973a3a7675b97261e7a1914e8f059 (patch) | |
tree | bf6886ab762984e238116b20121a011b9f8c030f | |
parent | 91afa513ad495bdc277c94ac2a4a4b829423f222 (diff) | |
download | pandoc-d6694256404973a3a7675b97261e7a1914e8f059.tar.gz |
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.
-rw-r--r-- | src/Text/Pandoc/Writers/Org.hs | 2 | ||||
-rw-r--r-- | tests/writer.org | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/Org.hs b/src/Text/Pandoc/Writers/Org.hs index 283bb7d9c..85b7433e6 100644 --- a/src/Text/Pandoc/Writers/Org.hs +++ b/src/Text/Pandoc/Writers/Org.hs @@ -160,7 +160,7 @@ blockToOrg (Para [Image attr txt (src,'f':'i':'g':':':tit)]) = do then return empty else ("#+CAPTION: " <>) `fmap` inlineListToOrg txt img <- inlineToOrg (Image attr txt (src,tit)) - return $ capt $$ img + return $ capt $$ img $$ blankline blockToOrg (Para inlines) = do contents <- inlineListToOrg inlines return $ contents <> blankline diff --git a/tests/writer.org b/tests/writer.org index 100328c2c..b29a1865c 100644 --- a/tests/writer.org +++ b/tests/writer.org @@ -809,6 +809,7 @@ From "Voyage dans la Lune" by Georges Melies (1902): #+CAPTION: lalune [[lalune.jpg]] + Here is a movie [[movie.jpg]] icon. -------------- |