Module:Redirect/sandbox: Difference between revisions

Content deleted Content added
Replace only the first _link_ of the _right kind_. Maybe this will handle telescoping...
mNo edit summary
Line 125:
local originalText = text -- I don't want to even think about conflicts...
local separator = {na = '([%]|]%]?)', yes = '|', no = '%]%]', make = '|', set = '%]%]'}
local newSeparator = {na = '%1', yes = '|', no = '%]%]', make = '|', set = '%]%]'}
local nextLink = mw.ustring.gmatch(originalText, "%[%[([^%]|]*)|?([^%]]-)%]%]")
local link = " " -- true