diff options
| author | John MacFarlane <[email protected]> | 2024-04-23 15:00:42 -0700 |
|---|---|---|
| committer | John MacFarlane <[email protected]> | 2024-04-23 15:00:42 -0700 |
| commit | b6cff6b96d17082a2fc2306ffd82af5521dfbf29 (patch) | |
| tree | 375fecdfdb6cb64baeaf663a56698920633cc0e6 /src/Text/Pandoc/Readers/EndNote.hs | |
| parent | 88eff1473225c5d4d287ed30470a4ec8eef4bc84 (diff) | |
Docx reader: issue warning rather than error...
when we can't parse EndNote citations. See #8433.
Diffstat (limited to 'src/Text/Pandoc/Readers/EndNote.hs')
| -rw-r--r-- | src/Text/Pandoc/Readers/EndNote.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Readers/EndNote.hs b/src/Text/Pandoc/Readers/EndNote.hs index 56a9dc0be..a35e5750e 100644 --- a/src/Text/Pandoc/Readers/EndNote.hs +++ b/src/Text/Pandoc/Readers/EndNote.hs @@ -72,10 +72,10 @@ readEndNoteXML _opts inp = do B.doc mempty readEndNoteXMLCitation :: PandocMonad m - => Sources -> m (Citeproc.Citation Text) -readEndNoteXMLCitation sources = do + => Text -> m (Citeproc.Citation Text) +readEndNoteXMLCitation xml = do tree <- either (throwError . PandocXMLError "EndNote references") return $ - parseXMLElement (TL.fromStrict . sourcesToText $ sources) + parseXMLElement (TL.fromStrict xml) unless (qName (elName tree) == "EndNote") $ throwError $ PandocXMLError "EndNote references" "Expected EndNote element" let items = map toCitationItem $ filterElementsName (name "Cite") tree |
