10,731
edits
TheNightAvl (talk | contribs) No edit summary |
TheNightAvl (talk | contribs) No edit summary |
||
Line 66: | Line 66: | ||
local function insert_rhyme(input, pos) | local function insert_rhyme(input, pos) | ||
if show_rhymes then | |||
local function insert_to_rhymes(rhyme) | |||
if not (rhyme == nil or m_table.contains(rhymes, rhyme)) then | |||
if pos == nil then | |||
table.insert(rhymes, rhyme) | |||
else | |||
table.insert(rhymes, pos, rhyme) | |||
pos = pos + 1 | |||
end | |||
-- mw.log("Rhyme registered: " .. rhyme) | |||
end | |||
end | |||
insert_to_rhymes(m_rad_IPA.get_rhyme(input)) | |||
local weak_rhymes = m_rad_IPA.get_weak_rhyme(input) | |||
if weak_rhymes then | |||
for _, weak_rhyme in ipairs(weak_rhymes) do | |||
insert_to_rhymes(weak_rhyme) | |||
end | |||
end | end | ||
end | end |