Difference between revisions of "Module:Test"
Jump to navigation
Jump to search
(Quick test to see how Lua reacts to it) |
m (Fix errors when no arguments are passed) |
||
| Line 8: | Line 8: | ||
end | end | ||
return "<nowiki>" .. args[1] .. "/nowiki>" | return "<nowiki>" .. (args[1] or "") .. "/nowiki>" | ||
end | end | ||
return p | return p | ||
Revision as of 11:00, 18 February 2015
Documentation for this module may be created at Module:Test/doc
local p = {}
function p.rss( f )
local args = f
if f == mw.getCurrentFrame() then
args = f:getParent().args
end
return "<nowiki>" .. (args[1] or "") .. "/nowiki>"
end
return p