1
0
forked from GitHub/gf-core

New unicodings.

New unicodings.
Module with works.

Better compilation of old GF.
This commit is contained in:
aarne
2003-11-14 12:36:23 +00:00
parent 37384dbe06
commit 5a7d6e542d
10 changed files with 75 additions and 22 deletions

View File

@@ -1,13 +1,28 @@
module Hebrew where
mkHebrew :: String -> String
mkHebrew = reverse . unwords . (map mkHebrewWord) . words
mkHebrew = mkHebrewWord
--- reverse : assumes everything's on same line
type HebrewChar = Char
-- HH 031103 added code for spooling the markup
-- removed reverse, words, unwords (seemed obsolete and come out wrong on the screen)
mkHebrewWord :: String -> [HebrewChar]
mkHebrewWord = map mkHebrewChar
-- mkHebrewWord = map mkHebrewChar
mkHebrewWord s = case s of
[] -> []
'<' : cs -> '<' : spoolMarkup cs
' ' : cs -> ' ' : mkHebrewWord cs
c1 : cs -> mkHebrewChar c1 : mkHebrewWord cs
spoolMarkup :: String -> String
spoolMarkup s = case s of
[] -> [] -- Shouldn't happen
'>' : cs -> '>' : mkHebrewWord cs
c1 : cs -> c1 : spoolMarkup cs
mkHebrewChar c = case lookup c cc of Just c' -> c' ; _ -> c
where