Module:Documentation:修订间差异

删除的内容 添加的内容
sandboxNotice: EXPECTUNUSEDTEMPLATE / isPreviewing / <small> 包裹
吸收用户版本改进:escapeBrackets / EXPECTUNUSED / isPreviewing / small / env.printTitle / endBox顺序
第263行:
function envFuncs.testcasesTitle()
return mw.title.new(env.docpageBase .. '/' .. message('testcases-subpage'))
end
 
function envFuncs.printTitle()
local templateTitle = env.templateTitle
if subjectSpace ~= 10 or not templateTitle then
return templateTitle.prefixedText .. '/' .. :subPageTitle(message('print-subpage'))
end
return nil
end
 
第584行 ⟶ 第592行:
if subjectSpace == 2 or subjectSpace == 10 or subjectSpace == 828 then
text = text .. (p.makeExperimentBlurb(args, env) or '') .. '<br />'
-- 若存在 /Print 子页面,提示打印版本链接
text = text .. (p.makePrintBlurb(args, env) or '')
if not args.content and not args[1] then
text = text .. (p.makeCategoriesBlurb(args, env) or '')
end
text = text .. '' .. (p.makeSubpagesBlurb(args, env) or '')
-- Print 版本提示(位于 end box 末尾)
textlocal printBlurb = text .. (p.makePrintBlurb(args, env) or '')
if printBlurb then
text = text .. '<br />' .. printBlurb
end
end
end
第756行 ⟶ 第767行:
--]=]
local subjectSpace = env.subjectSpace
local templateTitleprintTitle = env.templateTitleprintTitle
if subjectSpace ~= 10 or not printTitle or not printTitle.exists then
-- 仅模板空间显示打印版本提示
if subjectSpace ~= 10 or not templateTitle then
return nil
end
local printTitle = mw.title.new(
templateTitle.prefixedText .. '/' .. message('print-subpage')
)
if not printTitle or not printTitle.exists then
return nil
end
第772行 ⟶ 第776行:
text = text .. makeCategoryLink(message('print-category'))
end
return text .. '<br />'
end