From dae3a09433b54d7a7c9276b41f17cbc5e144afcc Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Tue, 14 Aug 2018 11:52:14 -0700 Subject: ODT reader: deal gracefully with missing ``. This allows pandoc to parse ODT document produced by KDE's Calligra. Closes #4336. --- src/Text/Pandoc/Readers/Odt/StyleReader.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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 -- cgit v1.2.3