summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2022-01-08 19:39:26 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2022-01-08 19:39:26 -0800
commit252211bd275e34e64c77d260348cedaa17ba4667 (patch)
tree6c226a9aaf19add6c37b454adb06e34e1a388d90 /src
parenta6741bd55525718b4e2eacd17ace07eb2646de08 (diff)
Org writer: don't add blank line before lists.
The code to do this was apparently copied over from the RST writer, but these blank lines aren't necessary or desirable in org. See #7810 comment 3.
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Writers/Org.hs8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/Text/Pandoc/Writers/Org.hs b/src/Text/Pandoc/Writers/Org.hs
index 3b7845cc9..0cf33f5b6 100644
--- a/src/Text/Pandoc/Writers/Org.hs
+++ b/src/Text/Pandoc/Writers/Org.hs
@@ -197,9 +197,7 @@ blockToOrg (Table _ blkCapt specs thead tbody tfoot) = do
return $ head'' $$ body $$ caption $$ blankline
blockToOrg (BulletList items) = do
contents <- mapM bulletListItemToOrg items
- -- ensure that sublists have preceding blank line
- return $ blankline $$
- (if isTightList items then vcat else vsep) contents $$
+ return $ (if isTightList items then vcat else vsep) contents $$
blankline
blockToOrg (OrderedList (start, _, delim) items) = do
let delim' = case delim of
@@ -210,9 +208,7 @@ blockToOrg (OrderedList (start, _, delim) items) = do
counters = (case start of 1 -> Nothing; n -> Just n) : repeat Nothing
contents <- zipWithM (\x f -> f x) items $
zipWith orderedListItemToOrg markers counters
- -- ensure that sublists have preceding blank line
- return $ blankline $$
- (if isTightList items then vcat else vsep) contents $$
+ return $ (if isTightList items then vcat else vsep) contents $$
blankline
blockToOrg (DefinitionList items) = do
contents <- mapM definitionListItemToOrg items