Module:Delink: Difference between revisions

From the Croc Wiki, the Croc encyclopedia
Jump to navigationJump to search
Content added Content deleted
(return false for bad links rather than returning the entire string)
(try capturing the whole of the pattern, in case it isn't doing this already)
Line 115: Line 115:
local function _delink(args)
local function _delink(args)
local text = args[1] or ""
local text = args[1] or ""
text = mw.ustring.gsub(text, "%[%[.-%]%]", delinkWikilink)
text = mw.ustring.gsub(text, "(%[%[.-%]%])", delinkWikilink)
text = mw.ustring.gsub(text, "%[.-%]", delinkURL)
text = mw.ustring.gsub(text, "(%[.-%])", delinkURL)
return text
return text
end
end