Module:descendants: Difference between revisions

m
ਕੋਈ ਸੋਧ ਸਾਰ ਨਹੀਂ
No edit summary
mNo edit summary
Line 164: Line 164:
end
end
if lang_change_arged then
if lang_change_arged then
for lang_arg in mw.ustring.gmatch(lang_change_arged, "%<([^%>]+)%>") do
for lang_arg in mw.ustring.gmatch(lang_change_arged, "<([^>]+)>") do
if mw.ustring.find(lang_arg, "%:") then
    local s = mw.text.split(lang_arg, ":", true)
local before, after = mw.ustring.match(lang_arg, "^([^%:]+)%:([^%:]+)$")
    terms[code][s[1]] = s[2] or true
terms[code][before] = after
    if #s > 2 then mw.addWarning("multiple : found in inline string") end
else
    end
terms[code][lang_arg] = true
end
end
end
end
if from_lang then terms[code]["from"] = from_lang end
if from_lang then terms[code]["from"] = from_lang end