Module:government: Difference between revisions

Jump to navigation Jump to search
ਕੋਈ ਸੋਧ ਸਾਰ ਨਹੀਂ
No edit summary
No edit summary
Line 88: Line 88:
while #temp > 0 do
while #temp > 0 do
mw.log(temp)
mw.log(show, temp)
-- case<t>
-- :prep(case)<t>
-- &label<t>
local function remove_temp(regex)
local function remove_temp(regex)
temp = mw.ustring.gsub(temp, regex, "")
temp = mw.ustring.gsub(temp, regex, "")
end
end
if mw.ustring.find(temp, "^%s*%/%s*") then
local conjunction = mw.ustring.match(temp, "^%s*([%/%+])%s*")
append(" ''or'' ")
if conjunction then
remove_temp("^%s*%/%s*")
if conjunction == "/" then
elseif mw.ustring.find(temp, "^%s*%+%s*") then
append(" ''or'' ")
append(" ''and'' ")
elseif conjunction == "+" then
remove_temp("^%s*%+%s*")
append(" ''and'' ")
else
end
remove_temp("^%s*[%/%+]%s*")
if mw.ustring.sub(temp, 1, 1) == "&" then
if mw.ustring.sub(temp, 1, 1) == "&" then
temp = mw.ustring.sub(temp, 2)
temp = mw.ustring.sub(temp, 2)
Line 108: Line 106:
with_needed = false
with_needed = false
end
end
else
local function glossary(form, colour)
local function glossary(form, colour)
if data[form] then
if data[form] then

Navigation menu