git.iko.soy/typeable/pandoc
on master help sign in
Docbook reader: Avoid failure if tbody contains no tr or row elements.
8264439John MacFarlane
src/Text/Pandoc/Readers/DocBook.hs+3−1
@@ -806,7 +806,9 @@ parseBlock (Elem e) =
806 (x >= '0' && x <= '9')
806 (x >= '0' && x <= '9')
807 || x == '.') w
807 || x == '.') w
808 Nothing -> 0 :: Double
808 Nothing -> 0 :: Double
809+ let numrows = case bodyrows of
810+ [] -> 0
809− let numrows = maximum $ map length bodyrows
811+ xs -> maximum $ map length xs
810 let aligns = case colspecs of
812 let aligns = case colspecs of
811 [] -> replicate numrows AlignDefault
813 [] -> replicate numrows AlignDefault
812 cs -> map toAlignment cs
814 cs -> map toAlignment cs