45,626
edits
No edit summary |
No edit summary |
||
Line 35: | Line 35: | ||
else | else | ||
local moduleLinks = {} | local moduleLinks = {} | ||
local withns | |||
for i, module in ipairs(modules) do | for i, module in ipairs(modules) do | ||
moduleLinks[i] = string.format('[[:%s]]', 'Module:' .. module) | withns = mw.ustring.match(module, "^[mM]odule:") | ||
moduleLinks[i] = string.format('[[:%s]]', (withns and '' or 'Module:') .. module) | |||
local maybeSandbox = mw.title.new(module .. '/sandbox') | local maybeSandbox = mw.title.new(module .. '/sandbox') | ||
if maybeSandbox.exists then | if maybeSandbox.exists then |