Module:Lockbox: Difference between revisions

Content deleted Content added
avoid table.insert (2x speed improvement!)
remove trailing newline
Line 32:
if not ns or not mw.site.namespaces[ns] then
generate_transclusion('Template:' .. item)
output[#output + 1] = '* [[Template:' .. item .. ']]\n'
elseif (ns == "File") or (ns == "Image") then
generate_transclusion(item)
output[#output + 1] = '* [[:' .. item .. ']]\n'
elseif ns == "Category" then
generate_transclusion(item)
output[#output + 1] = '* [[:' .. item .. ']]\n'
elseif rest ~= '' then
generate_transclusion(item)
output[#output + 1] = '* [[' .. item .. ']]\n'
end
end
Line 48:
return ""
else
return table.concat(output, '\n')
end
end