跳到内容

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