JATS reader: strip ref- prefix from ref id in xref.

This completes commit 807a574e9d.
Closes #8007.
This commit is contained in:
John MacFarlane 2022-04-06 23:12:07 -07:00
parent 125210c108
commit 7fb74b74df

View file

@ -528,7 +528,9 @@ parseInline (Elem e) =
return $ if refType == Just ("ref-type","bibr") return $ if refType == Just ("ref-type","bibr")
then cite then cite
(map (\id' -> (map (\id' ->
Citation{ citationId = id' let id'' = fromMaybe id' $
T.stripPrefix "ref-" id'
in Citation { citationId = id''
, citationPrefix = [] , citationPrefix = []
, citationSuffix = [] , citationSuffix = []
, citationMode = NormalCitation , citationMode = NormalCitation