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 diff --git a/test/command/5898.md b/test/command/5898.md new file mode 100644 index 000000000..28b64460a --- /dev/null +++ b/test/command/5898.md @@ -0,0 +1,36 @@ +``` +% pandoc -f html -t rst + +
+First | Second | Third | +
---|---|---|
First | +Second | +Third | +