diff options
Diffstat (limited to 'tex/context/third/transliterator/trans_tables_trsc.lua')
-rw-r--r-- | tex/context/third/transliterator/trans_tables_trsc.lua | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/tex/context/third/transliterator/trans_tables_trsc.lua b/tex/context/third/transliterator/trans_tables_trsc.lua index cad3567..0458539 100644 --- a/tex/context/third/transliterator/trans_tables_trsc.lua +++ b/tex/context/third/transliterator/trans_tables_trsc.lua @@ -487,17 +487,10 @@ translit.tables["Czech transcription for OCS and pre-1918 uppercase"] = translit function translit.transcript (mode, text) local P, R, S, V, Cs = lpeg.P, lpeg.R, lpeg.S, lpeg.V, lpeg.Cs - local loc = lpeg.locale () + local addrules = translit.addrules + local utfchar = lpeg.patterns.utf8char - -- http://lua-users.org/lists/lua-l/2009-06/msg00343.html - local utfchar = R("\000\127") + - R("\194\223") * R("\128\191") + - R("\224\240") * R("\128\191") * R("\128\191") + - R("\241\244") * R("\128\191") * R("\128\191") * R("\128\191") - - local trsc_parser, p_rules, capt - - local p_de + local trsc_parser, p_rules, capt, p_de function tab_subst (s, ...) local p_tmp, tmp = nil, translit.make_add_dict{} @@ -509,16 +502,6 @@ function translit.transcript (mode, text) return fp:match(s) end - -- Add keys of a dictionary to a ruleset. - function addrules (dict, rules) - for i, _ in pairs(dict) do - if rules == nil then rules = P(i) - else rules = rules + P(i) - end - end - return rules - end - -- The following is needed becaus lpeg.S doesn't work with utf. local vow, con, iy for _,v in ipairs (translit.ru_vowels) do |