From 7fb74b74df705742001ca583c4070b29e61ea275 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Wed, 6 Apr 2022 23:12:07 -0700 Subject: JATS reader: strip `ref-` prefix from ref id in xref. This completes commit 807a574e9d33fcf66928388e342cc1436eb2346e. Closes #8007. --- src/Text/Pandoc/Readers/JATS.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/Text/Pandoc/Readers/JATS.hs b/src/Text/Pandoc/Readers/JATS.hs index 9442e2506..930fc29fd 100644 --- a/src/Text/Pandoc/Readers/JATS.hs +++ b/src/Text/Pandoc/Readers/JATS.hs @@ -528,7 +528,9 @@ parseInline (Elem e) = return $ if refType == Just ("ref-type","bibr") then cite (map (\id' -> - Citation{ citationId = id' + let id'' = fromMaybe id' $ + T.stripPrefix "ref-" id' + in Citation { citationId = id'' , citationPrefix = [] , citationSuffix = [] , citationMode = NormalCitation -- cgit v1.2.3