Module:rhymes: Difference between revisions

ਕੋਈ ਸੋਧ ਸਾਰ ਨਹੀਂ
No edit summary
No edit summary
Line 58: Line 58:
local rhyme2
local rhyme2
if from_secondary[language.code] then
if from_secondary[language.code] then
rhyme2 = mw.ustring.match(rhyme, "ˌ(.*)$")
rhyme2 = {}
for rhyme_match in mw.ustring.gmatch(rhyme, "ˌ(.*)$") do
table.insert(rhyme2, rhyme_match)
end
end
end
rhyme = mw.ustring.match(rhyme, "ˈ(.*)$") or rhyme
rhyme = mw.ustring.match(rhyme, "ˈ(.*)$") or rhyme
table.insert(rhymes, de_onset(rhyme))
table.insert(rhymes, de_onset(rhyme))
if rhyme2 then table.insert(rhymes, de_onset(rhyme2)) end
if rhyme2 then
for _, rhyme2_temp in rhyme2 do
table.insert(rhymes, de_onset(rhyme2_temp))
end
end
end
end
end
end