Module:Lua banner:修订间差异

删除的内容 添加的内容
恢复到原始版本
renderBox:文案「前缀基于以下Lua语言模块编写:」,内联、链接不带前缀
第72行:
local moduleLinks = {}
for i, module in ipairs(modules) do
moduleLinks[i]local moduleName = '[[:Module:' .. mw.title.new(module).text .. ']]'
moduleLinks[i] = '[[:Module:' .. moduleName .. '|' .. moduleName .. ']]'
local maybeSandbox = mw.title.new(module .. '/sandbox')
if maybeSandbox and maybeSandbox.exists then
第78行 ⟶ 第79行:
end
end
local moduleList = mList.makeList('bulleted', moduleLinks)
local title = mw.title.getCurrentTitle()
if title.subpageText == 'doc' then
title = title.basePageTitle
end
local prefix
if title:inNamespaces(828, 829) then
boxArgs.textprefix = '此模块使用[[Wikipedia:Lua|Lua语言]]:\n' .. moduleList
elseif title.namespace == 10 then
prefix = '此模板'
else
prefix = '此页面'
boxArgs.text = '此模板使用[[Wikipedia:Lua|Lua语言]]:\n' .. moduleList▼
end
▲ boxArgs.text = prefix .. '此模板使用基于以下[[Wikipedia:Lua|Lua语言]]模块编写:\n' .. moduleListtable.concat(moduleLinks, '、')
end
boxArgs.type = 'notice'