變更
local helpText
if helpLink then
helpText = ' (([[' .. helpLink .. '|帮助]]))'
else
helpText = ''
--------------------------------------------------------------------------------
-- Format link格式化链接
--
-- Makes a wikilink from the given link and display values. Links are escaped
if not link then
return p.makeWikitextError(
'no link specified参数缺失', 'Template:Format hatnote link#Errors错误',
args.category
)
end
return p._formatLink(link, display)
end
checkType('_formatLink', 1, link, 'string')
checkType('_formatLink', 2, display, 'string', true)
-- Don't change anything for interlanguage links.ignore transwiki link
if link:match('<span class="ilh-') then
return link
end
-- Remove the initial colon for links where it was specified manually.
link = removeInitialColon(link)
end
-- Find the display value.
if not display then
local page, section = link:match('^(.-)#(.*)$')
--------------------------------------------------------------------------------
-- Hatnote顶注
--
-- Produces standard hatnote text. Implements the {{hatnote}} template.
-- 产生标准顶注文字。实现{{hatnote}}模板
--------------------------------------------------------------------------------
if not s then
return p.makeWikitextError(
' 没有输入文字text参数缺失',
'Template:Hatnote#错误',
args.category