Difference between revisions of "Module:Test"
Jump to navigation
Jump to search
m (Oops :D) |
m (Hmmmmm) |
||
| Line 8: | Line 8: | ||
end | end | ||
return "<nowiki>" .. (args[1] or "") .. "</nowiki>" | --return "<nowiki>" .. (args[1] or "") .. "</nowiki>" | ||
if args[1] == nil then | |||
return "Nothing :S" | |||
end | |||
if(args[1]:find("#")) then | |||
args[1] = string.match(args[1], '.+#%d+.+') | |||
end | |||
return args[1] | |||
end | end | ||
return p | return p | ||
Revision as of 11:04, 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>"
if args[1] == nil then
return "Nothing :S"
end
if(args[1]:find("#")) then
args[1] = string.match(args[1], '.+#%d+.+')
end
return args[1]
end
return p