Module:government: Difference between revisions

ਕੋਈ ਸੋਧ ਸਾਰ ਨਹੀਂ
No edit summary
No edit summary
Line 95: Line 95:
temp = mw.ustring.gsub(temp, regex, "")
temp = mw.ustring.gsub(temp, regex, "")
end
end
local with_text = (with_needed and " with") or ""
local with_text = ""
if mw.ustring.sub(temp, 1, 1) == "&" then
temp = mw.ustring.sub(temp, 2)
elseif with_needed then
with_text = " with"
end
if mw.ustring.find(temp, "^%s*%/%s*") then
if mw.ustring.find(temp, "^%s*%/%s*") then
append(" ''or" .. with_text .. "'' ")
append(" ''or" .. with_text .. "'' ")
remove_temp("^%s*%/%s*")
remove_temp("^%s*%/%s*")
if with_needed then with_needed = false end
if with_text ~= "" then with_needed = false end
elseif mw.ustring.find(temp, "^%s*%+%s*") then
elseif mw.ustring.find(temp, "^%s*%+%s*") then
append(" ''and" .. with_text .. "'' ")
append(" ''and" .. with_text .. "'' ")
remove_temp("^%s*%+%s*")
remove_temp("^%s*%+%s*")
if with_needed then with_needed = false end
if with_text ~= "" then with_needed = false end
else
else
local function glossary(form, colour)
local function glossary(form, colour)