跳至內容

「Module:Link」:修訂間差異

移除 2 位元組 、​ 2021年5月11日 (星期二)
無編輯摘要
(撤销Star0讨论)的版本26617)
標籤復原
無編輯摘要
行 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
local a,b,c = text:match('(.*?) (vs) (.*?)') or text:match('(.*?) (vs.) (.*?)')
:match('(.*?) (vs) (.*?)')
: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)