aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2018-08-14 11:52:14 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2018-08-14 11:52:14 -0700
commitdae3a09433b54d7a7c9276b41f17cbc5e144afcc (patch)
tree2d1e5e2fa83227b9d488d7bfbf346eb12ca00f96 /src/Text/Pandoc
parentc27ce1e70e72302d6cdc05ad59f45d0d04bda363 (diff)
downloadpandoc-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.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/Readers/Odt/StyleReader.hs2
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