GF/src is now for 2.9, and the new sources are in src-3.0 - keep it this way until the release of GF 3

This commit is contained in:
aarne
2008-05-21 09:26:44 +00:00
parent 915a1de717
commit 055c0d0d5a
536 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
----------------------------------------------------------------------
-- |
-- Module : ExtraDiacritics
-- Maintainer : (Maintainer)
-- Stability : (stable)
-- Portability : (portable)
--
-- > CVS $Date: 2005/04/21 16:23:36 $
-- > CVS $Author: bringert $
-- > CVS $Revision: 1.5 $
--
-- (Description of the module)
-----------------------------------------------------------------------------
module GF.Text.ExtraDiacritics (mkExtraDiacritics) where
mkExtraDiacritics :: String -> String
mkExtraDiacritics = mkExtraDiacriticsWord
mkExtraDiacriticsWord :: String -> String
mkExtraDiacriticsWord str = case str of
[] -> []
'<' : cs -> '<' : spoolMarkup cs
--
'/' : cs -> toEnum 0x0301 : mkExtraDiacriticsWord cs
'~' : cs -> toEnum 0x0306 : mkExtraDiacriticsWord cs
':' : cs -> toEnum 0x0304 : mkExtraDiacriticsWord cs -- some of these could be put in LatinA
'.' : cs -> toEnum 0x0323 : mkExtraDiacriticsWord cs
'i' : '-' : cs -> toEnum 0x0268 : mkExtraDiacriticsWord cs -- in IPA extensions
-- Default
c : cs -> c : mkExtraDiacriticsWord cs
spoolMarkup :: String -> String
spoolMarkup s = case s of
[] -> [] -- Shouldn't happen
'>' : cs -> '>' : mkExtraDiacriticsWord cs
c1 : cs -> c1 : spoolMarkup cs