Modulo:Delink/sandbox: differenze tra le versioni
Contenuto cancellato Contenuto aggiunto
m correggo parametro |
m versione attuale |
||
Riga 169:
args = frame_args
local text = args[1] or ""
if args.refs == "yes" or args.note == "sì" then
-- Remove any [[Help:Strip markers]] representing ref tags. In most situations
-- this is not a good idea - only use it if you know what you are doing!
text = mw.ustring.gsub(text, "UNIQ%w*%-ref%-%d*%-QINU", "")
end
if not (args.comments == "no" or args.commenti == "no") then
text = text:gsub("<!%-%-.-%-%->", "") -- Remove html comments.
end
if not (args.wikilinks == "no" or args.wikilink == "no") then
if args['singolo link'] then
text = mw.ustring.match(text, "^%[%[.-%]%]") or text
end
text = delinkLinkClass(text, "^%[%[.-%]%]", delinkWikilink) -- De-link wikilinks.
end
if not (args.urls == "no" or args.url == "no") then
text = delinkLinkClass(text, "^%[.-%]", delinkURL) -- De-link URLs.
end
if not (args.whitespace == "no" or args.spazi == "no") then
-- Replace single new lines with a single space, but leave double new lines
-- and new lines only containing spaces or tabs before a second new line.
|