diff options
author | John MacFarlane <jgm@berkeley.edu> | 2018-08-14 11:52:14 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2018-08-14 11:52:14 -0700 |
commit | dae3a09433b54d7a7c9276b41f17cbc5e144afcc (patch) | |
tree | 2d1e5e2fa83227b9d488d7bfbf346eb12ca00f96 | |
parent | c27ce1e70e72302d6cdc05ad59f45d0d04bda363 (diff) | |
download | pandoc-dae3a09433b54d7a7c9276b41f17cbc5e144afcc.tar.gz |
ODT reader: deal gracefully with missing `<office:font-face-decls/>`.
This allows pandoc to parse ODT document produced by KDE's Calligra.
Closes #4336.
-rw-r--r-- | src/Text/Pandoc/Readers/Odt/StyleReader.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/Odt/StyleReader.hs b/src/Text/Pandoc/Readers/Odt/StyleReader.hs index fa5c2d142..6a1682829 100644 --- a/src/Text/Pandoc/Readers/Odt/StyleReader.hs +++ b/src/Text/Pandoc/Readers/Odt/StyleReader.hs @@ -138,7 +138,7 @@ fontPitchReader = executeIn NsOffice "font-face-decls" ( lookupDefaultingAttr NsStyle "font-pitch" )) >>?^ ( M.fromList . foldl accumLegalPitches [] ) - ) + ) `ifFailedDo` (returnV (Right M.empty)) where accumLegalPitches ls (Nothing,_) = ls accumLegalPitches ls (Just n,p) = (n,p):ls |