Cleaner solution to #6723.

This commit is contained in:
John MacFarlane 2020-10-07 11:29:05 -07:00
parent 1742821c3e
commit 69b030c7df

View file

@ -151,7 +151,7 @@ processCitations (Pandoc meta bs) = do
(resultBibliography result)
let moveNotes = maybe True truish $
lookupMeta "notes-after-punctuation" meta
let cits = map (walk (convertQuotes locale)) $
let cits = map (walk fixLinks . walk (convertQuotes locale)) $
resultCitations result
let fixQuotes = case localePunctuationInQuote locale of
@ -164,9 +164,9 @@ processCitations (Pandoc meta bs) = do
walk (fixQuotes . mvPunct moveNotes locale) $ walk deNote $
evalState (walkM insertResolvedCitations $ Pandoc meta' bs)
$ cits
return $ walk fixLinks
$ Pandoc meta''
$ insertRefs refkvs classes meta'' (B.toList bibs) bs'
return $ Pandoc meta''
$ insertRefs refkvs classes meta''
(walk fixLinks $ B.toList bibs) bs'
-- If we have a span.csl-left-margin followed by span.csl-right-inline,
-- we insert a space. This ensures that they will be separated by a space,