aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authorJohn MacFarlane <fiddlosopher@gmail.com>2011-09-05 19:13:30 -0700
committerJohn MacFarlane <fiddlosopher@gmail.com>2011-09-05 19:13:30 -0700
commite3c560ac3d68c0569fd83247a883696a85a02afe (patch)
tree00ce2cf0028fbdad365ccdb0e958ca551baea919 /src/Text/Pandoc
parent75b9ba271633ea9cc461d1543e571e9d0759b0a0 (diff)
downloadpandoc-e3c560ac3d68c0569fd83247a883696a85a02afe.tar.gz
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.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/Writers/RST.hs2
1 files changed, 1 insertions, 1 deletions
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 =