求真百科歡迎當事人提供第一手真實資料,洗刷冤屈,終結網路霸凌。

變更

前往: 導覽搜尋

模块:Hatnote

增加 58 位元組, 5 年前
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
匿名用戶