Adjust widths in Markdown grid tables so that they match on round-trip.
This commit is contained in:
parent
298e6f38f9
commit
0dfcedad7e
1 changed files with 1 additions and 1 deletions
|
@ -638,7 +638,7 @@ gridTable opts headless aligns widths headers' rawRows = do
|
||||||
then replicate numcols (1.0 / fromIntegral numcols)
|
then replicate numcols (1.0 / fromIntegral numcols)
|
||||||
else widths
|
else widths
|
||||||
let widthsInChars = map
|
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]
|
let hpipeBlocks blocks = hcat [beg, middle, end]
|
||||||
where h = maximum (1 : map height blocks)
|
where h = maximum (1 : map height blocks)
|
||||||
sep' = lblock 3 $ vcat (map text $ replicate h " | ")
|
sep' = lblock 3 $ vcat (map text $ replicate h " | ")
|
||||||
|
|
Loading…
Reference in a new issue