git.iko.soy/typeable/pandoc
on master help sign in
Docbook reader: Avoid failure if tbody contains no tr or row elements.
commit826443926f85b72840b49cd7973e91ed80a09b5d authorJohn MacFarlane <jgm@berkeley.edu> dateMon 16 Dec 2013, 13:58 (13 years ago) parent2f00f5c
1 file changed+3−1
src/Text/Pandoc/Readers/DocBook.hs+3−1
src/Text/Pandoc/Readers/DocBook.hs+3−1
@@ -806,7 +806,9 @@ parseBlock (Elem e) =
806806 (x >= '0' && x <= '9')
807807 || x == '.') w
808808 Nothing -> 0 :: Double
809− let numrows = maximum $ map length bodyrows
809+ let numrows = case bodyrows of
810+ [] -> 0
811+ xs -> maximum $ map length xs
810812 let aligns = case colspecs of
811813 [] -> replicate numrows AlignDefault
812814 cs -> map toAlignment cs