mirror of
https://github.com/jgm/pandoc.git
synced 2026-08-28 11:16:33 +00:00
RST, Markdown writers: Fixed rendering of grid tables with blank rows.
Closes #2615.
This commit is contained in:
@@ -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 " |")
|
||||
|
||||
@@ -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 " |")
|
||||
|
||||
Reference in New Issue
Block a user