From e3c560ac3d68c0569fd83247a883696a85a02afe Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Mon, 5 Sep 2011 19:13:30 -0700 Subject: RST writer: Fixed bug involving empty table cells. isSimple was being calculated in a way that assumed there were no non-empty cells. Resolves #299. Thanks to rmunoz for reporting the bug. --- src/Text/Pandoc/Writers/RST.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Text/Pandoc/Writers/RST.hs b/src/Text/Pandoc/Writers/RST.hs index d4adaa929..4cf64c267 100644 --- a/src/Text/Pandoc/Writers/RST.hs +++ b/src/Text/Pandoc/Writers/RST.hs @@ -176,7 +176,7 @@ blockToRST (Table caption _ widths headers rows) = do else blankline <> text "Table: " <> caption' headers' <- mapM blockListToRST headers rawRows <- mapM (mapM blockListToRST) rows - let isSimple = all (==0) widths && all (all (\bs -> length bs == 1)) rows + let isSimple = all (==0) widths && all (all (\bs -> length bs <= 1)) rows let numChars = maximum . map offset opts <- get >>= return . stOptions let widthsInChars = -- cgit v1.2.3