ODT reader: deal gracefully with missing <office:font-face-decls/>.

This allows pandoc to parse ODT document produced by KDE's Calligra.
Closes #4336.
This commit is contained in:
John MacFarlane 2018-08-14 11:52:14 -07:00
parent c27ce1e70e
commit dae3a09433

View file

@ -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