diff options
| author | John MacFarlane <jgm@berkeley.edu> | 2022-04-06 23:12:07 -0700 |
|---|---|---|
| committer | John MacFarlane <jgm@berkeley.edu> | 2022-04-06 23:14:10 -0700 |
| commit | 7fb74b74df705742001ca583c4070b29e61ea275 (patch) | |
| tree | 989b62bbf4c96e17ce0d2c39e64656836c43f911 /src | |
| parent | 125210c108e234f977f0c37883378b923ba7d2be (diff) | |
JATS reader: strip `ref-` prefix from ref id in xref.
This completes commit 807a574e9d33fcf66928388e342cc1436eb2346e.
Closes #8007.
Diffstat (limited to 'src')
| -rw-r--r-- | src/Text/Pandoc/Readers/JATS.hs | 4 |
1 files changed, 3 insertions, 1 deletions
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 |
