aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers/Markdown.hs
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2018-04-21 13:06:57 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2018-04-21 13:06:57 -0700
commit7fbe473b2e3b3b2b94be810b6385475c056a304a (patch)
tree324f44cf3d2f281f38d243f89836e33f8d3197eb /src/Text/Pandoc/Writers/Markdown.hs
parent229db80ac23ab0b5dba396d7748fcba0d05c4785 (diff)
downloadpandoc-7fbe473b2e3b3b2b94be810b6385475c056a304a.tar.gz
Markdown reader/writer: spacing adjustments in tables.
* Markdown writer now includes a blank line at the end of the row in a single-row multiline table, to prevent it from being interpreted as a simple table. Closes #4578. * Markdown reader does a better job computing the relative width of the last column in a multiline table, so we can round-trip tables without constantly shrinking the last column.
Diffstat (limited to 'src/Text/Pandoc/Writers/Markdown.hs')
-rw-r--r--src/Text/Pandoc/Writers/Markdown.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/Markdown.hs b/src/Text/Pandoc/Writers/Markdown.hs
index 3bfa8a012..075858e5e 100644
--- a/src/Text/Pandoc/Writers/Markdown.hs
+++ b/src/Text/Pandoc/Writers/Markdown.hs
@@ -732,7 +732,10 @@ pandocTable opts multiline headless aligns widths rawHeaders rawRows = do
then empty
else border <> cr <> head'
let body = if multiline
- then vsep rows'
+ then vsep rows' $$
+ if length rows' < 2
+ then blankline -- #4578
+ else empty
else vcat rows'
let bottom = if headless
then underline