diff options
author | John MacFarlane <jgm@berkeley.edu> | 2021-08-13 19:19:43 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2021-08-13 19:25:29 -0700 |
commit | 82638ad53bb47acde835083390f8211ac21cda6c (patch) | |
tree | fb45f6ba642cd059e7b2a3e54dfe93aa61071f84 /src/Text | |
parent | 15683bb607eb924816adcb7e7884fe722d3d3129 (diff) | |
download | pandoc-82638ad53bb47acde835083390f8211ac21cda6c.tar.gz |
Convert Quoted in bib entries to special Spans...
before passing them off to citeproc.
This ensures that we get proper localization and flipflopping
if, e.g., quotes are used in titles.
Closes jgm/citeproc#87.
Diffstat (limited to 'src/Text')
-rw-r--r-- | src/Text/Pandoc/Citeproc.hs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Citeproc.hs b/src/Text/Pandoc/Citeproc.hs index 0f007f336..39760776d 100644 --- a/src/Text/Pandoc/Citeproc.hs +++ b/src/Text/Pandoc/Citeproc.hs @@ -208,7 +208,9 @@ getReferences mblocale (Pandoc meta bs) = do Just fp -> getRefsFromBib locale idpred fp Nothing -> return [] Nothing -> return [] - return $ map (linkifyVariables . legacyDateRanges) + let addQuoteSpan (Quoted _ xs) = Span ("",["csl-quoted"],[]) xs + addQuoteSpan x = x + return $ map (linkifyVariables . legacyDateRanges . walk addQuoteSpan) (externalRefs ++ inlineRefs) -- note that inlineRefs can override externalRefs |