Module:Consecutive links: Difference between revisions

m
no edit summary
mNo edit summary
mNo edit summary
Line 11: Line 11:
local linkprefix = args[6]
local linkprefix = args[6]
local linkpostfix = args[7]
local linkpostfix = args[7]
local brackets = brackets or {'[[', ']]'}
local brackets = brackets or {'[[', ']]', ''}


local b = string.gsub(args[1], "%s*" .. separator .. "%s*", linkpostfix .. brackets[2] .. replacer .. brackets[1] .. linkprefix)
local b = string.gsub(args[1], "%s*" .. separator .. "%s*", linkpostfix .. brackets[2] .. replacer .. brackets[1] .. linkprefix.. brackets[3])
return prefix .. brackets[1] .. linkprefix .. b .. linkpostfix ..brackets[2] .. postfix
return prefix .. brackets[1] .. linkprefix.. brackets[3] .. b .. linkpostfix ..brackets[2] .. postfix
end
end


function p.consecutivelinks(frame)
function p.consecutivelinks(frame)
return p.parse(frame.args, {'[[', ']]'})
return p.parse(frame.args, {'[[', ']]', ''})
end
end


function p.consecutivetemplates(frame)
function p.consecutivetemplates(frame)
return p.parse(frame.args, {'{{', '}}'})
return p.parse(frame.args, {'{{', '}}', '|'})
end
end


return p
return p