aboutsummaryrefslogtreecommitdiff
path: root/src/Text
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2021-08-13 19:19:43 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2021-08-13 19:25:29 -0700
commit82638ad53bb47acde835083390f8211ac21cda6c (patch)
treefb45f6ba642cd059e7b2a3e54dfe93aa61071f84 /src/Text
parent15683bb607eb924816adcb7e7884fe722d3d3129 (diff)
downloadpandoc-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.hs4
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