Module:Article list and Module:Article list/sandbox: Difference between pages
Appearance
(Difference between pages)
Content deleted Content added
Replace Module:No globals with require( "strict" ) |
use require('strict') instead of require('Module:No globals') |
||
Line 1: | Line 1: | ||
⚫ | |||
require('strict') |
require('strict') |
||
⚫ | |||
local function makelink(link) |
local function makelink(link) |
||
Line 91: | Line 90: | ||
end |
end |
||
end |
end |
||
local output = '<ul>'..table.concat(links2) |
local output = '<ul>'..table.concat(links2)..'</ul>' |
||
if mw.title.getCurrentTitle():inNamespace(10) then |
if mw.title.getCurrentTitle():inNamespace(10) then |
||
output = output..notes |
output = output..notes |
||
end |
end |
||
return output |
return output |
||
end |
end |
||
Line 102: | Line 101: | ||
local pargs = frame:getParent().args |
local pargs = frame:getParent().args |
||
local input = args[1] or pargs[1] |
local input = args[1] or pargs[1] |
||
local prefix = args.prefix or pargs.prefix |
|||
if prefix == nil then |
|||
prefix = "Article list|" |
|||
end |
|||
if input == nil then |
if input == nil then |
||
return nil |
return nil |
||
Line 123: | Line 118: | ||
end |
end |
||
end |
end |
||
return "{{" |
return "{{Article list|"..table.concat(qidlist,", ").."}}" |
||
end |
end |
||