Module:labels: Difference between revisions

m
ਕੋਈ ਸੋਧ ਸਾਰ ਨਹੀਂ
mNo edit summary
mNo edit summary
Line 50: Line 50:
if mw.ustring.find(labels[it], "^.+%s+" .. conjunction .. "%s+.+") then
if mw.ustring.find(labels[it], "^.+%s+" .. conjunction .. "%s+.+") then
local before = mw.ustring.gsub(labels[it], "^(.+)%s+" .. conjunction .. "%s+(.+)", "%1")
local before = mw.ustring.gsub(labels[it], "^(.+)%s+" .. conjunction .. "%s+(.+)", "%1")
local conj_temp = mw.ustring.gsub(labels[it], "^(.+)%s+" .. conjunction .. "%s+(.+)", "%2")
local after = mw.ustring.gsub(labels[it], "^(.+)%s+" .. conjunction .. "%s+(.+)", "%2")
local after = mw.ustring.gsub(labels[it], "^(.+)%s+" .. conjunction .. "%s+(.+)", "%3")
labels[it] = before
labels[it] = before
table.insert(labels, it + 1, after)
table.insert(labels, it + 1, after)
table.insert(labels, it + 1, conj_temp)
table.insert(labels, it + 1, conjunction)
end
end
end
end