aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers/Textile.hs
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2021-03-18 23:01:12 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2021-03-18 23:01:12 -0700
commit3428248debb14066e7fb1ef216927d3d62e3a43a (patch)
treeb25be4ecdf948a9e8813d9449874db8674e5c933 /src/Text/Pandoc/Readers/Textile.hs
parentf0e4b9cc3cde01d64e25d331c5b4f3d62d2129b5 (diff)
downloadpandoc-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.hs4
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)