@@ -53,7 +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)
56+import Data.List.NonEmpty (nonEmpty)
5757
5858-- | Parse a Textile text and return a Pandoc document.
5959readTextile :: PandocMonad m
@@ -377,7 +377,7 @@ table = try $ do
377377 (toprow, rest)
378378 _ -> (mempty, rawrows)
379379 let nbOfCols = maximum $ map length (headers:rows)
380− let aligns = map (minimumDef AlignDefault) $
380+ let aligns = map (maybe AlignDefault minimum . nonEmpty) $
381381 transpose $ map (map (snd . fst)) (headers:rows)
382382 let toRow = Row nullAttr . map B.simpleCell
383383 toHeaderRow l = [toRow l | not (null l)]