跳至內容

「Module:Link」:修訂間差異

移除 40 位元組 、​ 2021年5月11日 (星期二)
無編輯摘要
無編輯摘要
無編輯摘要
行 16: 行 16:
function p.link(frame)
function p.link(frame)
local page,text=mw.getCurrentFrame():getParent().args[1],mw.getCurrentFrame():getParent().args[2]
local page,text=mw.getCurrentFrame():getParent().args[1],mw.getCurrentFrame():getParent().args[2]
local a,b,c = text:match('(.*?) (vs) (.*?)') or text:match('(.*?) (vs.) (.*?)')
local a,b,c = text:match('(.*) (vs) (.*)') or text:match('(.*) (vs.) (.*)')
if a and b and c then
if a and b and c then
return link(a)..b..link(c)
return link(a)..b..link(c)
end
end
 
return text:match('(.*?) vs .*?')
end
end


return p
return p