aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2019-11-13 10:10:55 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2019-11-13 10:10:55 -0800
commit5c0b3743becd10a08fc27459d56f8aa2153f5b3f (patch)
treea37136ee8011a5691d3976af0315d6b979eb357a /src
parent791043772b1e950fe32768eaf3c247148289ebbd (diff)
downloadpandoc-5c0b3743becd10a08fc27459d56f8aa2153f5b3f.tar.gz
Ensure there's a blank line before RST tables.
Closes #5898.
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Writers/RST.hs9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/Text/Pandoc/Writers/RST.hs b/src/Text/Pandoc/Writers/RST.hs
index 5f035ee1f..b299e6135 100644
--- a/src/Text/Pandoc/Writers/RST.hs
+++ b/src/Text/Pandoc/Writers/RST.hs
@@ -300,10 +300,11 @@ blockToRST (Table caption aligns widths headers rows) = do
else gridTable opts blocksToDoc (all null headers)
(map (const AlignDefault) aligns) widths
headers rows
- return $ if null caption
- then tbl $$ blankline
- else (".. table:: " <> caption') $$ blankline $$ nest 3 tbl $$
- blankline
+ return $ blankline $$
+ (if null caption
+ then tbl
+ else (".. table:: " <> caption') $$ blankline $$ nest 3 tbl) $$
+ blankline
blockToRST (BulletList items) = do
contents <- mapM bulletListItemToRST items
-- ensure that sublists have preceding blank line