JATS reader: support edition in references.

Closes #8087.
Note: we strip off any non-digits, since CSL wants "4" rather
than "4th ed."
This commit is contained in:
John MacFarlane 2022-05-31 12:01:15 -07:00
parent ae8ed408b0
commit bd13077ce0

View file

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