Module:Documentation:修订间差异
删除的内容 添加的内容
新增 escapeBrackets 函数 + renderStartBoxLinks 方括号实体包裹 |
sandboxNotice: EXPECTUNUSEDTEMPLATE / isPreviewing / <small> 包裹 |
||
第342行:
omargs.image = message('sandbox-notice-image')
local text = '__EXPECTUNUSEDTEMPLATE__'
local pagetype, pagetypee, sandboxCat
if subjectSpace == 10 then
第360行:
local templateLink = makeWikilink(templateTitle.prefixedText)
local compareUrl = env.compareUrl
-- mworg 预览检测:预览时不显示 diff 链接
if compareUrl then▼
local isPreviewing = mw.getCurrentFrame():preprocess('{{REVISIONID}}') == ''
▲ if isPreviewing or not compareUrl then
text = text .. message('sandbox-notice-blurb', {pagetype, templateLink})▼
else▼
local compareDisplay = message('sandbox-notice-compare-link-display')
local compareLink = makeUrlLink(compareUrl, compareDisplay)
text = text .. message('sandbox-notice-diff-blurb', {pagetype, templateLink, compareLink})
▲ else
▲ text = text .. message('sandbox-notice-blurb', {pagetype, templateLink})
end
第375行 ⟶ 第377行:
local testcasesLink = makeWikilink(testcasesTitle.prefixedText, testcasesLinkDisplay)
local testcasesRunLink = makeWikilink(testcasesTitle.talkPageTitle.prefixedText, testcasesRunLinkDisplay)
text = text .. '<br /><small>' .. message('sandbox-notice-testcases-run-blurb', {pagetypee, testcasesLink, testcasesRunLink}) .. '</small>'
else
local testcasesLinkDisplay = message('sandbox-notice-testcases-link-display')
local testcasesLink = makeWikilink(testcasesTitle.prefixedText, testcasesLinkDisplay)
text = text .. '<br /><small>' .. message('sandbox-notice-testcases-blurb', {pagetypee, testcasesLink}) .. '</small>'
end
end
| |||