Module:Consecutive links: Difference between revisions

m
no edit summary
(fixed consecutive links bug)
mNo edit summary
Line 25: Line 25:


if type == 'links' then
if type == 'links' then
   returnstrformat = function(prefix, word, postfix)
   returnstrformat = function(linkprefix, word, linkpostfix)
     return prefix .. '[['.. word  .. ']]' .. postfix
     return prefix .. '[[' .. linkprefix .. word  .. linkpostfix .. ']]' .. postfix
     end
     end
elseif type == 'templates' then
elseif type == 'templates' then
Line 39: Line 39:
     returnstr = returnstr .. replacer  
     returnstr = returnstr .. replacer  
   end
   end
   returnstr = returnstr .. returnstrformat(prefix, word, postfix)
   returnstr = returnstr .. returnstrformat(linkprefix, word, linkpostfix)
end
end
return returnstr
return returnstr