From 0dfcedad7ef98dfcfdb2378b7c974bf96b93fbcc Mon Sep 17 00:00:00 2001 From: John MacFarlane <jgm@berkeley.edu> Date: Tue, 15 Nov 2016 16:48:24 +0100 Subject: Adjust widths in Markdown grid tables so that they match on round-trip. --- src/Text/Pandoc/Writers/Markdown.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Text/Pandoc') 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 " | ") -- cgit v1.2.3