Modulo:Criteri cancellazione immediata/sandbox: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
usa id del namespace
fix link e aggiungo parametro anchor
Riga 39:
 
if add_link then
textif = stringmw.title.formatnew('([[WP:IMMEDIATA|%s]]) %s', self:getAbbreviation(), text'Wikipedia' ).exists then
text = string.format('([[WP:%s|%s]]) %s',
self:getAbbreviation(), self:getAbbreviation(), text)
else
text = string.format('([[WP:IMMEDIATA|%s]]) %s', self:getAbbreviation(), text)
end
end
 
Riga 170 ⟶ 175:
 
for _, criterion in ipairs(valid_criteria) do
list = stringlist .format(. '%s\n%s %s', list,.. get_list_prefix(args['tipo elenco']), .. ' '
 
criterion:getText(args.ns, args['tipo testo'], args.link))
if args.anchor then
list = list .. string.format('<span id=%s></span>', criterion:getAbbreviation())
end
 
list = list .. criterion:getText(args.ns, args['tipo testo'], args.link))
end
 
Riga 203 ⟶ 213:
 
args.link = args.link ~= 'no' and true or false
args.anchor = args.anchor == 'sì' and true or false
 
return args