Module:Link:修订间差异

无编辑摘要
无编辑摘要
第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('([^\s]*) (vs) ([^\s]*)') or text:match('([^\s]*) (vs.) ([^\s]*)')
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)