forked from GitHub/gf-core
allow empty lines in transliteration files
This commit is contained in:
@@ -90,7 +90,7 @@ mkTransliteration name ts us =
|
|||||||
getTransliterationFile :: String -> String -> Transliteration
|
getTransliterationFile :: String -> String -> Transliteration
|
||||||
getTransliterationFile name = uncurry (mkTransliteration name) . codes
|
getTransliterationFile name = uncurry (mkTransliteration name) . codes
|
||||||
where
|
where
|
||||||
codes = unzip . map (mkOne . words) . lines
|
codes = unzip . map (mkOne . words) . filter (not . all isSpace) . lines
|
||||||
mkOne ws = case ws of
|
mkOne ws = case ws of
|
||||||
[c]:t:_ -> (t,fromEnum c) -- ä a:
|
[c]:t:_ -> (t,fromEnum c) -- ä a:
|
||||||
u:t:_ -> (t,read u) -- 228 a: OR 0xe4
|
u:t:_ -> (t,read u) -- 228 a: OR 0xe4
|
||||||
|
|||||||
Reference in New Issue
Block a user