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 >= '0' && x <= '9')
|
||||||
|| x == '.') w
|
|| x == '.') w
|
||||||
Nothing -> 0 :: Double
|
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
|
let aligns = case colspecs of
|
||||||
[] -> replicate numrows AlignDefault
|
[] -> replicate numrows AlignDefault
|
||||||
cs -> map toAlignment cs
|
cs -> map toAlignment cs
|
||||||
|
|
Loading…
Add table
Reference in a new issue