@@ -219,11 +219,15 @@ blockToRST (Table caption _ widths headers rows) = do
219 else blankline <> text "Table: " <> caption'
219 else blankline <> text "Table: " <> caption'
220 headers' <- mapM blockListToRST headers
220 headers' <- mapM blockListToRST headers
221 rawRows <- mapM (mapM blockListToRST) rows
221 rawRows <- mapM (mapM blockListToRST) rows
222+ -- let isSimpleCell [Plain _] = True
223+ -- isSimpleCell [Para _] = True
224+ -- isSimpleCell [] = True
225+ -- isSimpleCell _ = False
222− let isSimple = all (==0) widths && all (all (\bs -> length bs <= 1)) rows
226+ -- let isSimple = all (==0) widths && all (all isSimpleCell) rows
223 let numChars = maximum . map offset
227 let numChars = maximum . map offset
224 opts <- get >>= return . stOptions
228 opts <- get >>= return . stOptions
225 let widthsInChars =
229 let widthsInChars =
226− if isSimple
230+ if all (== 0) widths
227 then map ((+2) . numChars) $ transpose (headers' : rawRows)
231 then map ((+2) . numChars) $ transpose (headers' : rawRows)
228 else map (floor . (fromIntegral (writerColumns opts) *)) widths
232 else map (floor . (fromIntegral (writerColumns opts) *)) widths
229 let hpipeBlocks blocks = hcat [beg, middle, end]
233 let hpipeBlocks blocks = hcat [beg, middle, end]