Anonymous user
Module:Delink: Difference between revisions
From the Croc Wiki, the Croc encyclopedia
Jump to navigationJump to search
whitespace matching for urls should be working this time, hopefully
(revert - doesn't work) |
(whitespace matching for urls should be working this time, hopefully) |
||
Line 11:
local url_prefix
for i,v in ipairs(valid_url_prefixes) do
if mw.ustring.match(s, '^%[' .. v ..'[^"
url_prefix = v
break
Line 23:
s = mw.ustring.match(s, "^%[" .. url_prefix .. "(.*)%]") -- Grab all of the text after the URL prefix and before the final square bracket.
s = mw.ustring.match(s, '^.-(["<> ].*)') or "" -- Grab all of the text after the first URL separator character ("<> ).
s = mw.ustring.match(s, "^
return s
end
|