Modulo:Tracce: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
Moroboshi (discussione | contributi)
Nessun oggetto della modifica
Moroboshi (discussione | contributi)
Nessun oggetto della modifica
Riga 2:
return (tonumber(args["Minuti" .. i]) and 0) * 60 + tonumber(args["Secondi" .. i]) and 0
end
 
-- Protects a string that will be wrapped in wiki italic markup '' ... ''
local function safeforitalics( str )
--[[ Note: We can not use <i> for italics, as the expected behavior for
italics specified by ''...'' in the title is that they will be inverted
(i.e. unitalicized) in the resulting references. In addition, <i> and ''
tend to interact poorly under Mediawiki's HTML tidy. ]]
if str == nil or str == '' then
return str;
else
if str:sub(1,1) == "'" then str = "<span />" .. str; end
if str:sub(-1,-1) == "'" then str = str .. "<span />"; end
return str;
end
end
 
 
local function track(args, i)
Riga 10 ⟶ 27:
interprete = args["Interprete" .. i] or ""
if interprete ~= "" then table.insert(row_elements, interprete .. " - ") end
table.insert(row_elements, "''" .. safeforitalics(titolo) .. "''")
table.insert(row_elements, titolo)
table.insert(row_elements, "''")
local featuring = args["Featuring" .. i] or ""
if featuring ~= "" then