git.iko.soy/typeable/pandoc
on master help sign in
Adjust widths in Markdown grid tables so that they match on round-trip.
commit0dfcedad7ef98dfcfdb2378b7c974bf96b93fbcc authorJohn MacFarlane <jgm@berkeley.edu> dateTue 15 Nov 2016, 16:48 (10 years ago) parent298e6f3
1 file changed+1−1
src/Text/Pandoc/Writers/Markdown.hs+1−1
src/Text/Pandoc/Writers/Markdown.hs+1−1
@@ -638,7 +638,7 @@ gridTable opts headless aligns widths headers' rawRows = do
638638 then replicate numcols (1.0 / fromIntegral numcols)
639639 else widths
640640 let widthsInChars = map
641− ((\x -> x - 1) . floor . (fromIntegral (writerColumns opts) *)) widths'
641+ ((\x -> x - 3) . floor . (fromIntegral (writerColumns opts) *)) widths'
642642 let hpipeBlocks blocks = hcat [beg, middle, end]
643643 where h = maximum (1 : map height blocks)
644644 sep' = lblock 3 $ vcat (map text $ replicate h " | ")