Module:Link: Difference between revisions
MusikAnimal (talk | contribs) No edit summary |
MusikAnimal (talk | contribs) No edit summary |
||
Line 2: | Line 2: | ||
function str.producer( frame ) | function str.producer( frame ) | ||
local new_args = str | local new_args = str.args[1] | ||
local content = new_args['source'] or '' | local content = new_args['source'] or '' | ||
if content == '' then | if content == '' then | ||
Line 13: | Line 13: | ||
return content | return content | ||
end | end | ||
return str | return str |
Revision as of 21:29, 17 April 2020
Documentation for this module may be created at Module:Link/doc
local str = {}
function str.producer( frame )
local new_args = str.args[1]
local content = new_args['source'] or ''
if content == '' then
return content
end
for _i, subject in ipairs({ 'Billy Corgan', 'Butch Vig' }) do
mw.ustring.gsub( content, subject, '[[:Category:Songs produced by ' .. subject .. '|' .. subject .. ']]' )
end
return content
end
return str