Docbook reader: Avoid failure if tbody contains no tr or row elements.
This commit is contained in:
parent
2f00f5c7c2
commit
826443926f
1 changed files with 3 additions and 1 deletions
|
@ -806,7 +806,9 @@ parseBlock (Elem e) =
|
|||
(x >= '0' && x <= '9')
|
||||
|| x == '.') w
|
||||
Nothing -> 0 :: Double
|
||||
let numrows = maximum $ map length bodyrows
|
||||
let numrows = case bodyrows of
|
||||
[] -> 0
|
||||
xs -> maximum $ map length xs
|
||||
let aligns = case colspecs of
|
||||
[] -> replicate numrows AlignDefault
|
||||
cs -> map toAlignment cs
|
||||
|
|
Loading…
Reference in a new issue