diff options
author | John MacFarlane <jgm@berkeley.edu> | 2021-04-11 21:28:19 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2021-04-17 16:15:13 -0700 |
commit | 7ba8c0d2a5e2b89ae1547759510b2ee21de88cb1 (patch) | |
tree | 74aeb0241d8a8b7716afe5154fc157eab024c566 /src/Text/Pandoc/Citeproc | |
parent | ff5a5048091b765ed15750ccb5ea30f9459ba33a (diff) | |
download | pandoc-7ba8c0d2a5e2b89ae1547759510b2ee21de88cb1.tar.gz |
Move getLang from BCP47 -> T.P.Writers.Shared.
[API change]
Diffstat (limited to 'src/Text/Pandoc/Citeproc')
-rw-r--r-- | src/Text/Pandoc/Citeproc/Data.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Citeproc/Data.hs b/src/Text/Pandoc/Citeproc/Data.hs index dfdaf2598..40430b0f5 100644 --- a/src/Text/Pandoc/Citeproc/Data.hs +++ b/src/Text/Pandoc/Citeproc/Data.hs @@ -10,7 +10,7 @@ import qualified Data.Text.Encoding as TE import qualified Data.Text as T import Data.Text (Text) import Text.Pandoc.Citeproc.Util (toIETF) -import Citeproc (Lang(..), parseLang) +import UnicodeCollation.Lang (Lang(..), parseLang) biblatexLocalizations :: [(FilePath, ByteString)] biblatexLocalizations = $(embedDir "citeproc/biblatex-localization") @@ -21,7 +21,8 @@ biblatexStringMap :: M.Map Text (M.Map Text (Text, Text)) biblatexStringMap = foldr go mempty biblatexLocalizations where go (fp, bs) = - let Lang lang _ = parseLang (toIETF $ T.takeWhile (/= '.') $ T.pack fp) + let Lang lang _ _ _ _ _ = parseLang + (toIETF $ T.takeWhile (/= '.') $ T.pack fp) ls = T.lines $ TE.decodeUtf8 bs in if length ls > 4 then M.insert lang (toStringMap $ map (T.splitOn "|") ls) |