Module:If empty: Difference between revisions
From the Croc Wiki, the Croc encyclopedia
Jump to navigationJump to search
Content added Content deleted
(greatly simplify) |
|||
Line 1: | Line 1: | ||
⚫ | |||
-- this is intended to replace {{If empty}} |
|||
⚫ | |||
function p. |
function p.main(frame) |
||
for k,v in ipairs(require('Module:Arguments').getArgs(frame, {wrappers = 'Template:If empty', removeBlanks = false})) do |
|||
if v ~= '' then |
|||
⚫ | |||
args[table.getn(args)] = '' |
|||
end |
|||
while args[i] == nil or string.len(args[i]) == 0 do |
|||
i = i + 1 |
|||
end |
end |
||
⚫ | |||
end |
end |
||
return p |
return p |