1,124
edits
Line 58: | Line 58: | ||
function p.iconList(frame) | function p.iconList(frame) | ||
if string.match(string.lower(frame.args[1]), '%[%[file:') ~= nil then | |||
return '[[Category:Material List with Embedded Templates]]' | |||
else | |||
list = string.gsub(string.gsub(frame.args[1], '%[%[', ''), '%]%]', '') | |||
mw.log(list) | |||
list = mw.text.split(list, ';') | |||
result = '' | |||
for k, v in ipairs(list) do | |||
vs = mw.text.split(v, '-') | |||
result = result .. _requirements(vs[1], vs[2], nil, frame.args['text']) | |||
if k ~= table.getn(list) then | |||
result = result .. '<br />' | |||
end | |||
end | end | ||
end | end |