aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Class
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2021-04-11 21:28:48 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2021-04-17 16:15:14 -0700
commitaecbf8156eb7c36c4b41de27797e262c23728db5 (patch)
tree2c9fe9de41a0f7037485dacee444b36cc2ccc110 /src/Text/Pandoc/Class
parent7ba8c0d2a5e2b89ae1547759510b2ee21de88cb1 (diff)
downloadpandoc-aecbf8156eb7c36c4b41de27797e262c23728db5.tar.gz
Remove Text.Pandoc.BCP47 module.
[API change] Use Lang from UnicodeCollation.Lang instead. This is a richer implementation of BCP 47.
Diffstat (limited to 'src/Text/Pandoc/Class')
-rw-r--r--src/Text/Pandoc/Class/CommonState.hs2
-rw-r--r--src/Text/Pandoc/Class/PandocMonad.hs4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Class/CommonState.hs b/src/Text/Pandoc/Class/CommonState.hs
index 7e1735c2b..0fd094d99 100644
--- a/src/Text/Pandoc/Class/CommonState.hs
+++ b/src/Text/Pandoc/Class/CommonState.hs
@@ -19,7 +19,7 @@ where
import Data.Default (Default (def))
import Data.Text (Text)
-import Text.Pandoc.BCP47 (Lang)
+import UnicodeCollation.Lang (Lang)
import Text.Pandoc.MediaBag (MediaBag)
import Text.Pandoc.Logging (LogMessage, Verbosity (WARNING))
import Text.Pandoc.Translations (Translations)
diff --git a/src/Text/Pandoc/Class/PandocMonad.hs b/src/Text/Pandoc/Class/PandocMonad.hs
index 293a822a0..76f1fa32b 100644
--- a/src/Text/Pandoc/Class/PandocMonad.hs
+++ b/src/Text/Pandoc/Class/PandocMonad.hs
@@ -70,7 +70,7 @@ import Network.URI ( escapeURIString, nonStrictRelativeTo,
import System.FilePath ((</>), (<.>), takeExtension, dropExtension,
isRelative, splitDirectories)
import System.Random (StdGen)
-import Text.Pandoc.BCP47 (Lang(..), parseBCP47, renderLang)
+import UnicodeCollation.Lang (Lang(..), parseLang, renderLang)
import Text.Pandoc.Class.CommonState (CommonState (..))
import Text.Pandoc.Definition
import Text.Pandoc.Error
@@ -285,7 +285,7 @@ readFileFromDirs (d:ds) f = catchError
toLang :: PandocMonad m => Maybe T.Text -> m (Maybe Lang)
toLang Nothing = return Nothing
toLang (Just s) =
- case parseBCP47 s of
+ case parseLang s of
Left _ -> do
report $ InvalidLang s
return Nothing