Module:government: Difference between revisions

ਕੋਈ ਸੋਧ ਸਾਰ ਨਹੀਂ
No edit summary
No edit summary
Line 128: Line 128:
local form, colour
local form, colour
if mw.ustring.find(temp, "^%:[^%(%<%[%+%/%:]+") then
if mw.ustring.find(temp, "^%:[^%(%<%[%+%/%:]+") then
temp_append("'''")
while mw.ustring.find(temp, "^%:[^%(%<%[%+%/%:]+") do
while mw.ustring.find(temp, "^%:[^%(%<%[%+%/%:]+") do
local link = mw.ustring.match(temp, "^%:([^%(%<%[%+%/%:]+)")
local link = mw.ustring.match(temp, "^%:([^%(%<%[%+%/%:]+)")
local spacing = mw.ustring.match(link, "%s+$", "") or ""
link = mw.ustring.gsub(link, "%s+$", "")
link = mw.ustring.gsub(link, "%s+$", "")
temp_append("'''" .. m_links.full_link{language = language, term = link} .. "'''")
temp_append(m_links.full_link{language = language, term = link} .. spacing)
remove_temp("^%:[^%(%<%[%+%/%:]+")
remove_temp("^%:[^%(%<%[%+%/%:]+")
end
end
temp_append("'''")
if mw.ustring.find(temp, "^%([^%)]+%)") then
if mw.ustring.find(temp, "^%([^%)]+%)") then
form = mw.ustring.match(temp, "^%(([^%)]+)%)")
form = mw.ustring.match(temp, "^%(([^%)]+)%)")