Module:Utils: Difference between revisions

ArrowHead294 (talk | contribs)
mNo edit summary
ArrowHead294 (talk | contribs)
m Let's just use the template
Tag: Manual revert
Line 30: Line 30:
function p.value_provided(s)
function p.value_provided(s)
return type(s) == "string" and #s > 0
return type(s) == "string" and #s > 0
end
-- Return a link to Wikipedia in Wiki markup
function p.wlink(a, b)
return string.format("[[wikipedia:%s|%s]]", a, ((b == nil or p.trim(b) == "") and a or b))
end
end