diff options
author | John MacFarlane <jgm@berkeley.edu> | 2021-08-13 17:29:58 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2021-08-13 17:30:54 -0700 |
commit | 05640f9a21e7963de4501b85f47cc1daa203c195 (patch) | |
tree | 91767ffbf1e630235c35d568c105d04364d0498d /src/Text/Pandoc/Citeproc.hs | |
parent | 418155aa9516170e3fd661aa537e5ee719d73ef7 (diff) | |
download | pandoc-05640f9a21e7963de4501b85f47cc1daa203c195.tar.gz |
Removed quote localization from citeproc processing.
This is now done in citeproc itself.
Diffstat (limited to 'src/Text/Pandoc/Citeproc.hs')
-rw-r--r-- | src/Text/Pandoc/Citeproc.hs | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/src/Text/Pandoc/Citeproc.hs b/src/Text/Pandoc/Citeproc.hs index 246f54516..bfd108655 100644 --- a/src/Text/Pandoc/Citeproc.hs +++ b/src/Text/Pandoc/Citeproc.hs @@ -88,13 +88,11 @@ processCitations (Pandoc meta bs) = do _ -> id) $ [] let bibs = mconcat $ map (\(ident, out) -> B.divWith ("ref-" <> ident,["csl-entry"],[]) . B.para . - walk (convertQuotes locale) . insertSpace $ out) (resultBibliography result) let moveNotes = styleIsNoteStyle sopts && maybe True truish (lookupMeta "notes-after-punctuation" meta) - let cits = map (walk (convertQuotes locale)) $ - resultCitations result + let cits = resultCitations result let metanocites = lookupMeta "nocite" meta let Pandoc meta'' bs' = @@ -265,23 +263,6 @@ getRefs locale format idpred mbfp raw = do (L.fromStrict raw) return $ mapMaybe metaValueToReference rs --- localized quotes -convertQuotes :: Locale -> Inline -> Inline -convertQuotes locale (Quoted qt ils) = - case (M.lookup openterm terms, M.lookup closeterm terms) of - (Just ((_,oq):_), Just ((_,cq):_)) -> - Span ("",[],[]) (Str oq : ils ++ [Str cq]) - _ -> Quoted qt ils - where - terms = localeTerms locale - openterm = case qt of - DoubleQuote -> "open-quote" - SingleQuote -> "open-inner-quote" - closeterm = case qt of - DoubleQuote -> "close-quote" - SingleQuote -> "close-inner-quote" -convertQuotes _ x = x - -- assumes we walk in same order as query insertResolvedCitations :: Inline -> State [Inlines] Inline insertResolvedCitations (Cite cs ils) = do |