summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2016-11-15 16:48:24 +0100
committerJohn MacFarlane <jgm@berkeley.edu>2016-11-15 16:48:24 +0100
commit0dfcedad7ef98dfcfdb2378b7c974bf96b93fbcc (patch)
tree2b9b81157eb72400fe49d2779723cbc7d69b0d6d
parent298e6f38f9dd2723bce3c68c5b8c376fceb49755 (diff)
Adjust widths in Markdown grid tables so that they match on round-trip.
-rw-r--r--src/Text/Pandoc/Writers/Markdown.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/Markdown.hs b/src/Text/Pandoc/Writers/Markdown.hs
index f46699d74..49f711f74 100644
--- a/src/Text/Pandoc/Writers/Markdown.hs
+++ b/src/Text/Pandoc/Writers/Markdown.hs
@@ -638,7 +638,7 @@ gridTable opts headless aligns widths headers' rawRows = do
then replicate numcols (1.0 / fromIntegral numcols)
else widths
let widthsInChars = map
- ((\x -> x - 1) . floor . (fromIntegral (writerColumns opts) *)) widths'
+ ((\x -> x - 3) . floor . (fromIntegral (writerColumns opts) *)) widths'
let hpipeBlocks blocks = hcat [beg, middle, end]
where h = maximum (1 : map height blocks)
sep' = lblock 3 $ vcat (map text $ replicate h " | ")