ODT reader: deal gracefully with missing `<office:font-face-decls/>`.
This allows pandoc to parse ODT document produced by KDE's Calligra.
Closes #4336.
commitdae3a09433b54d7a7c9276b41f17cbc5e144afcc
authorJohn MacFarlane <jgm@berkeley.edu>
dateTue 14 Aug 2018, 11:52 (8 years ago)
parentc27ce1e
src/Text/Pandoc/Readers/Odt/StyleReader.hs+1−1
@@ -138,7 +138,7 @@ fontPitchReader = executeIn NsOffice "font-face-decls" (
138138 lookupDefaultingAttr NsStyle "font-pitch"
139139 ))
140140 >>?^ ( M.fromList . foldl accumLegalPitches [] )
141− )
141+ ) `ifFailedDo` (returnV (Right M.empty))
142142 where accumLegalPitches ls (Nothing,_) = ls
143143 accumLegalPitches ls (Just n,p) = (n,p):ls
144144