欢迎来到奇葩栖息地!欢迎加入Discord服务器:XfrfHCzfbW欢迎加入QQ频道:r01m9y3iz6请先至特殊:参数设置验证邮箱后再进行编辑。特殊:参数设置挑选自己想要使用的小工具!不会编辑?请至这里学习Wikitext语法。

模块:Sprite:修订间差异

来自奇葩栖息地
删除14字节 、​ 2021年5月5日 (星期三)
// Edit via Wikiplus
(建立内容为“local p = {} function p.base( f ) local args = f if f == mw.getCurrentFrame() then args = require( 'Module:ProcessArgs' ).merge( true ) else f = mw.getCur…”的新页面)
 
(// Edit via Wikiplus)
 
第10行:
local data = args.data and mw.loadData( 'Module:' .. args.data ) or {}
local settings = data.settings
 
local Autolink = require( 'Module:Autolink' )
-- Default settings
第95行 ⟶ 第93行:
local spriteText
if text then
if not args['wrap'] then
root = mw.html.create( 'span' ):addClass( 'nowrap' )
end
spriteText = mw.html.create( 'span' ):addClass( 'sprite-text' ):wikitext( Autolink.invlink( text, 'nolink', args.data ) )
end
第123行 ⟶ 第121行:
-- Internal link
local linkPrefix = setting( 'linkprefix' ) or ''
return '[[' .. linkPrefix .. Autolink.invlink( link, 'linkonly', args.data ) .. '|' .. tostring( root ) .. ']]'
end
第153行 ⟶ 第151行:
args.class = ( args.class or '' ) .. ' sprite-deprecated'
if not disallowCats then
categories[#categories + 1] = '[[Categoryf:使用已弃用Sprite的页面]]expandTemplate{ title = 'Translation category', args = { 'Pages using deprecated sprite names', project = 0 } }
end
end
第159行 ⟶ 第157行:
args.pos = idData.pos
elseif not disallowCats then
categories[#categories + 1] = '[[Categoryf:含有错误Sprite的页面]]expandTemplate{ title = 'Translation category', args = { 'Pages with missing sprites', project = 0 } }
end
2,007

个编辑