@@ -53,6 +53,7 @@ import Text.Pandoc.Parsing
5353import Text.Pandoc.Readers.HTML (htmlTag, isBlockTag, isInlineTag)
5454import Text.Pandoc.Readers.LaTeX (rawLaTeXBlock, rawLaTeXInline)
5555import Text.Pandoc.Shared (crFilter, trim, tshow)
56+import Safe (minimumDef)
5657
5758-- | Parse a Textile text and return a Pandoc document.
5859readTextile :: PandocMonad m
@@ -376,7 +377,8 @@ table = try $ do
376377 (toprow, rest)
377378 _ -> (mempty, rawrows)
378379 let nbOfCols = maximum $ map length (headers:rows)
379− let aligns = map minimum $ transpose $ map (map (snd . fst)) (headers:rows)
380+ let aligns = map (minimumDef AlignDefault) $
381+ transpose $ map (map (snd . fst)) (headers:rows)
380382 let toRow = Row nullAttr . map B.simpleCell
381383 toHeaderRow l = [toRow l | not (null l)]
382384 return $ B.table (B.simpleCaption $ B.plain caption)