diff options
| author | John MacFarlane <[email protected]> | 2022-05-31 12:01:15 -0700 |
|---|---|---|
| committer | John MacFarlane <[email protected]> | 2022-05-31 12:01:15 -0700 |
| commit | bd13077ce025266af30e43c4f29c5cf65b9c8217 (patch) | |
| tree | f8abfcaaceece8f2b4a606e409a077553b7a39c3 | |
| parent | ae8ed408b03688f4ddf6a13d0e55fba9138c6eb9 (diff) | |
JATS reader: support edition in references.
Closes #8087.
Note: we strip off any non-digits, since CSL wants "4" rather
than "4th ed."
| -rw-r--r-- | src/Text/Pandoc/Readers/JATS.hs | 2 |
1 files changed, 2 insertions, 0 deletions
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, |
