summaryrefslogtreecommitdiff
path: root/tex/context/third
diff options
context:
space:
mode:
authorPhilipp Gesang <pgesang@ix.urz.uni-heidelberg.de>2011-05-10 12:28:08 +0200
committerPhilipp Gesang <pgesang@ix.urz.uni-heidelberg.de>2011-05-10 12:28:08 +0200
commit889ace69482cd1b3e2be4142fe5403922ec226df (patch)
treed2db2a0b2983940a72232deb89897e687e8fcabe /tex/context/third
parentadc06ec6e6e32fafe4e0689bd8a5e9d31000012e (diff)
downloadtransliterator-889ace69482cd1b3e2be4142fe5403922ec226df.tar.gz
expanded manual
Diffstat (limited to 'tex/context/third')
-rw-r--r--tex/context/third/transliterator/trans_tables_sr.lua12
1 files changed, 7 insertions, 5 deletions
diff --git a/tex/context/third/transliterator/trans_tables_sr.lua b/tex/context/third/transliterator/trans_tables_sr.lua
index 9abe5b2..84319b0 100644
--- a/tex/context/third/transliterator/trans_tables_sr.lua
+++ b/tex/context/third/transliterator/trans_tables_sr.lua
@@ -100,14 +100,16 @@ end
local t = translit
local function sr (mode, text)
- local P, R, S, V, Cs = lpeg.P, lpeg.R, lpeg.S, lpeg.V, lpeg.Cs
+ local P, R, Cs = lpeg.P, lpeg.R, lpeg.Cs
local utfchar = translit.utfchar
- local trl_sr = translit.make_add_dict{}
- trl_sr = t[mode.."_upper"] + t[mode.."_lower"]
+ local trl_sr = translit.make_add_dict{}
+ trl_sr = t[mode.."_upper"] + t[mode.."_lower"]
- local _p_sr = translit.addrules (trl_sr, _p_sr)
- local p_sr = Cs((_p_sr / trl_sr + utfchar)^0)
+ -- transliteration from latin script requires macro handling …
+ local _p_macro = P[[\]] * R("az", "AZ")^1
+ local _p_sr = translit.addrules (trl_sr, _p_sr)
+ local p_sr = Cs((_p_macro + (_p_sr / trl_sr) + utfchar)^0)
return p_sr:match(text)
end