Module:If empty
Jump to navigation
Jump to search
This module implements {{If empty}} . |
Code
--
-- This module implements {{If empty}}
--
-- This is an improved version from cawiki, previously copied from enwiki version [https://ca.wikipedia.org/w/index.php?title=Module:If_empty&oldid=20680566 >> 12-jan-2019]
local p = {}
function p.main(frame)
local args = require('Module:Arguments').getArgs(frame, {wrappers = 'Template:If empty', removeBlanks = false})
for k,v in ipairs(args) do
if v ~= '' then
return v
end
end
end
return p