Module:government: Difference between revisions

ਕੋਈ ਸੋਧ ਸਾਰ ਨਹੀਂ
No edit summary
No edit summary
Line 114: Line 114:
if mw.ustring.find(temp, "^%:[^%(%<%[%+%/]+") then
if mw.ustring.find(temp, "^%:[^%(%<%[%+%/]+") then
local link = mw.ustring.match(temp, "^%:([^%(%<%[%+%/]+)")
local link = mw.ustring.match(temp, "^%:([^%(%<%[%+%/]+)")
link = mw.ustring.gsub(link, "%s+$", "")
append("'''" .. m_links.full_link{language = language, term = link} .. "'''")
append("'''" .. m_links.full_link{language = language, term = link} .. "'''")
remove_temp("^%:[^%(%<%[%+%/]+")
remove_temp("^%:[^%(%<%[%+%/]+")
Line 127: Line 128:
else
else
form = mw.ustring.match(temp, "^([^%(%<%[%+%/]+)")
form = mw.ustring.match(temp, "^([^%(%<%[%+%/]+)")
form = mw.ustring.gsub(form, "%s+$", "")
remove_temp("^([^%(%<%[%+%/]+)")
remove_temp("^([^%(%<%[%+%/]+)")
if mw.ustring.find(temp, "^%[[^%]]+%]") then
if mw.ustring.find(temp, "^%[[^%]]+%]") then
Line 154: Line 156:
Debug console test string:
Debug console test string:
=p.generate(mw.getCurrentFrame():newChild{title="whatever",args={"accusative"}})
=p.generate(mw.getCurrentFrame():newChild{title="whatever",args={"accusative"}})
=p.show(mw.getCurrentFrame():newChild{title="whatever",args={"rad"}})
=p.show(mw.getCurrentFrame():newChild{title="whatever",args={"rad", "acc / :la(dat)", ["pos"] = "verb"}})
]]
]]