diff --git a/src/Text/Pandoc/Citeproc/Locator.hs b/src/Text/Pandoc/Citeproc/Locator.hs index 0b8f79922..35d5388b0 100644 --- a/src/Text/Pandoc/Citeproc/Locator.hs +++ b/src/Text/Pandoc/Citeproc/Locator.hs @@ -276,7 +276,9 @@ toLocatorMap locale = go tname locmap = case M.lookup tname (localeTerms locale) of Nothing -> locmap - Just ts -> foldr (\x -> M.insert (snd x) tname) locmap ts + Just ts -> foldr (\x -> M.insert (T.toCaseFold $ snd x) tname) locmap ts +-- we store keys in "case-folded" (lowercase) form, so that both +-- "Chap." and "chap." will match, for example. locatorTerms :: [Text] locatorTerms =