forked from GitHub/gf-core
added mode 'gf --run' for running silently a script ; made quizzes handle character encoding correctly ; for this end, collected coding functions in GF.Text.Coding
This commit is contained in:
@@ -28,11 +28,11 @@ data CommandEnv = CommandEnv {
|
||||
expmacros :: Map.Map String Tree
|
||||
}
|
||||
|
||||
mkCommandEnv :: (String -> String) -> PGF -> CommandEnv
|
||||
mkCommandEnv :: String -> PGF -> CommandEnv
|
||||
mkCommandEnv enc pgf = CommandEnv pgf (allCommands enc pgf) Map.empty Map.empty
|
||||
|
||||
emptyCommandEnv :: CommandEnv
|
||||
emptyCommandEnv = mkCommandEnv encodeUTF8 emptyPGF
|
||||
emptyCommandEnv = mkCommandEnv "utf8" emptyPGF
|
||||
|
||||
interpretCommandLine :: (String -> String) -> CommandEnv -> String -> IO ()
|
||||
interpretCommandLine enc env line =
|
||||
|
||||
Reference in New Issue
Block a user