RST, Markdown writers: Fixed rendering of grid tables with blank rows.

Closes #2615.
This commit is contained in:
John MacFarlane 2016-01-05 14:01:45 -08:00
parent a81b0932e5
commit a796538d84
2 changed files with 2 additions and 2 deletions

View file

@ -572,7 +572,7 @@ gridTable opts headless _aligns widths headers' rawRows = do
else widths
let widthsInChars = map (floor . (fromIntegral (writerColumns opts) *)) widths'
let hpipeBlocks blocks = hcat [beg, middle, end]
where h = maximum (map height blocks)
where h = maximum (1 : map height blocks)
sep' = lblock 3 $ vcat (map text $ replicate h " | ")
beg = lblock 2 $ vcat (map text $ replicate h "| ")
end = lblock 2 $ vcat (map text $ replicate h " |")

View file

@ -267,7 +267,7 @@ blockToRST (Table caption _ widths headers rows) = do
then map ((+2) . numChars) $ transpose (headers' : rawRows)
else map (floor . (fromIntegral (writerColumns opts) *)) widths
let hpipeBlocks blocks = hcat [beg, middle, end]
where h = maximum (map height blocks)
where h = maximum (1 : map height blocks)
sep' = lblock 3 $ vcat (map text $ replicate h " | ")
beg = lblock 2 $ vcat (map text $ replicate h "| ")
end = lblock 2 $ vcat (map text $ replicate h " |")