Anonymous user
Module:Delink: Difference between revisions
deal with multiple-line external links
en>Mr. Stradivarius (full delete character handling in urls) |
en>Mr. Stradivarius (deal with multiple-line external links) |
||
Line 96: | Line 96: | ||
-- Assume we have already delinked internal wikilinks, and that | -- Assume we have already delinked internal wikilinks, and that | ||
-- we have been passed some text between two square brackets [foo]. | -- we have been passed some text between two square brackets [foo]. | ||
-- If the text contains a line break it is not formatted as a URL, regardless of other content. | |||
if mw.ustring.match(s, "\n") then | |||
return s | |||
end | |||
-- Check if the text has a valid URL prefix and at least one valid URL character. | -- Check if the text has a valid URL prefix and at least one valid URL character. |