diff options
author | John MacFarlane <jgm@berkeley.edu> | 2013-12-16 13:58:54 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2013-12-16 13:58:54 -0800 |
commit | 826443926f85b72840b49cd7973e91ed80a09b5d (patch) | |
tree | f2b1f2aba75b7f75e6d32597db2235773d5c3b33 /src | |
parent | 2f00f5c7c22ef879df3a21f1c3da967d106628e9 (diff) | |
download | pandoc-826443926f85b72840b49cd7973e91ed80a09b5d.tar.gz |
Docbook reader: Avoid failure if tbody contains no tr or row elements.
Diffstat (limited to 'src')
-rw-r--r-- | src/Text/Pandoc/Readers/DocBook.hs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/DocBook.hs b/src/Text/Pandoc/Readers/DocBook.hs index fc29988d5..03c6140ac 100644 --- a/src/Text/Pandoc/Readers/DocBook.hs +++ b/src/Text/Pandoc/Readers/DocBook.hs @@ -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 |