From bd13077ce025266af30e43c4f29c5cf65b9c8217 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Tue, 31 May 2022 12:01:15 -0700 Subject: JATS reader: support edition in references. Closes #8087. Note: we strip off any non-digits, since CSL wants "4" rather than "4th ed." --- src/Text/Pandoc/Readers/JATS.hs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/Text/Pandoc/Readers/JATS.hs b/src/Text/Pandoc/Readers/JATS.hs index 930fc29fd..a86cc0e4c 100644 --- a/src/Text/Pandoc/Readers/JATS.hs +++ b/src/Text/Pandoc/Readers/JATS.hs @@ -452,6 +452,8 @@ parseRef e = do "publisher-name" -> Just . ("publisher",) . toMetaValue <$> getInlines el "publisher-loc" -> Just . ("publisher-place",) . toMetaValue <$> getInlines el + "edition" -> pure $ Just ("edition", + toMetaValue . T.filter isDigit $ strContent el) "person-group" -> do names <- mapM getName (filterChildren (named "name") el) pure $ Just (attrValue "person-group-type" el, -- cgit v1.2.3