Skip to content

Commit

Permalink
ODT reader: deal gracefully with missing <office:font-face-decls/>.
Browse files Browse the repository at this point in the history
This allows pandoc to parse ODT document produced by KDE's Calligra.
Closes #4336.
  • Loading branch information
jgm committed Aug 14, 2018
1 parent c27ce1e commit dae3a09
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Text/Pandoc/Readers/Odt/StyleReader.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit dae3a09

Please sign in to comment.