diff options
author | John MacFarlane <jgm@berkeley.edu> | 2021-03-18 23:01:12 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2021-03-18 23:01:12 -0700 |
commit | 3428248debb14066e7fb1ef216927d3d62e3a43a (patch) | |
tree | b25be4ecdf948a9e8813d9449874db8674e5c933 /src/Text/Pandoc/Readers/Textile.hs | |
parent | f0e4b9cc3cde01d64e25d331c5b4f3d62d2129b5 (diff) | |
download | pandoc-3428248debb14066e7fb1ef216927d3d62e3a43a.tar.gz |
Use minimumDef instead of minimum (partial function).
Diffstat (limited to 'src/Text/Pandoc/Readers/Textile.hs')
-rw-r--r-- | src/Text/Pandoc/Readers/Textile.hs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/Textile.hs b/src/Text/Pandoc/Readers/Textile.hs index 99238c7f0..50ffd36ec 100644 --- a/src/Text/Pandoc/Readers/Textile.hs +++ b/src/Text/Pandoc/Readers/Textile.hs @@ -53,6 +53,7 @@ import Text.Pandoc.Parsing import Text.Pandoc.Readers.HTML (htmlTag, isBlockTag, isInlineTag) import Text.Pandoc.Readers.LaTeX (rawLaTeXBlock, rawLaTeXInline) import Text.Pandoc.Shared (crFilter, trim, tshow) +import Safe (minimumDef) -- | Parse a Textile text and return a Pandoc document. readTextile :: PandocMonad m @@ -376,7 +377,8 @@ table = try $ do (toprow, rest) _ -> (mempty, rawrows) let nbOfCols = maximum $ map length (headers:rows) - let aligns = map minimum $ transpose $ map (map (snd . fst)) (headers:rows) + let aligns = map (minimumDef AlignDefault) $ + transpose $ map (map (snd . fst)) (headers:rows) let toRow = Row nullAttr . map B.simpleCell toHeaderRow l = [toRow l | not (null l)] return $ B.table (B.simpleCaption $ B.plain caption) |