Module:ryn-mut: Difference between revisions

ਕੋਈ ਸੋਧ ਸਾਰ ਨਹੀਂ
No edit summary
No edit summary
Line 37: Line 37:
local vowel_pattern = "[aáeiíouú]"
local vowel_pattern = "[aáeiíouú]"
local gh_to_v_vowel_pattern = "[eiíuú]"
local gh_to_v_vowel_pattern = "[eiíuú]"
local no_soft_i_insertion = "[ií]"


local function get_radical_data(term)
local function get_radical_data(term)
Line 69: Line 70:
return change .. data.remainder
return change .. data.remainder
end
end
if data.prevowel and (not (mw.ustring.sub(data.remainder, 1, 1) == "i")) then
if data.prevowel and (not mw.ustring.find(mw.ustring.sub(data.remainder, 1, 1), no_soft_i_insertion)) then
return data.initial .. "i" .. data.remainder
return data.initial .. "i" .. data.remainder
end
end