Modul:WLink: Unterschied zwischen den Versionen
2019-11-16, https://de.wikipedia.org/w/index.php?title=Wikipedia:Administratoren/Anfragen&curid=6974524&diff=194103462&oldid=194103367
w>Funkruf (gemäß Wunsch von WP:AAF aktuaisiert. https://de.wikipedia.org/w/index.php?title=Wikipedia:Administratoren/Anfragen&type=revision&diff=193929566&oldid=193929048&diffmode=source) |
w>NordNordWest (2019-11-16, https://de.wikipedia.org/w/index.php?title=Wikipedia:Administratoren/Anfragen&curid=6974524&diff=194103462&oldid=194103367) |
||
| Zeile 1: | Zeile 1: | ||
local WLink = { suite = "WLink", | local WLink = { suite = "WLink", | ||
serial = "2019-11- | serial = "2019-11-16", | ||
item = 19363224 }; | item = 19363224, | ||
globals = { URLutil = 10859193 } }; | |||
--[=[ | --[=[ | ||
ansiPercent() | ansiPercent() | ||
| Zeile 130: | Zeile 132: | ||
-- Throws error, if not available | -- Throws error, if not available | ||
if not URLutil then | if not URLutil then | ||
local util = foreignModule( "URLutil", true, false, | local util = foreignModule( "URLutil", | ||
true, | |||
false, | |||
WLink.globals.URLutil ); | |||
if type( util ) == "table" then | if type( util ) == "table" then | ||
URLutil = util.URLutil(); | URLutil = util.URLutil(); | ||
| Zeile 731: | Zeile 736: | ||
r = "]"; | r = "]"; | ||
elseif mw.text.unstripNoWiki( attempt ) ~= attempt then | elseif mw.text.unstripNoWiki( attempt ) ~= attempt then | ||
r = "< | r = "<nowiki>"; | ||
elseif attempt:find( "\n", 1, true ) then | elseif attempt:find( "\n", 1, true ) then | ||
r = "\n"; | r = "\n"; | ||
elseif mw.text.unstrip( attempt ) ~= attempt then | |||
if not WLink.stripREF then | |||
WLink.stripREF = string.format( "%c%c%c%c%s%c%c%c%c", | |||
127, 39, 34, 96, | |||
"UNIQ%-+ref%-%x+%-QINU", | |||
96, 34, 39, 127 ); | |||
end | |||
if mw.ustring.find( attempt, WLink.stripREF ) then | |||
r = "<ref>"; | |||
end | |||
end | |||
if not r then | |||
local i = attempt:find( "<", 1, true ); | local i = attempt:find( "<", 1, true ); | ||
if i then | if i then | ||