Anonimo

Modulo:FunzioniGeneriche: differenze tra le versioni

Da Wikitrek.
m
nessun oggetto della modifica
(Process of property Assegnazione fixed for Timeline)
mNessun oggetto della modifica
 
(8 versioni intermedie di uno stesso utente non sono mostrate)
Riga 79: Riga 79:
Cell:node(List)
Cell:node(List)
else
else
Cell
if type(Field[1]) == "table" then
:wikitext(Field[1])
Cell
:wikitext(Field[1][1])
else
Cell
:wikitext(Field[1])
end
end
end
end
end
Riga 241: Riga 246:
end
end
--Removes suffix
--Removes suffix year or number specification
FullName = FullName:gsub("%s%(%d+%)", "")
--Removes suffix registry number
FullName = FullName:gsub("%s[^%s]+$", "")
FullName = FullName:gsub("%s[^%s]+$", "")
Riga 285: Riga 292:
         end
         end
        
        
         --[=[
         if string.find(ParaString, "%[%[") == nil then
        -- Determine if property is Assignment
        -- There is no wikilink, plain text
    if PropName == "Assegnazione" then
        LIPattern = "<li>(.-)</li>"
    -- Look for <i> to get the object of assignment
        else
    LIPattern = "<li>.-<i>%[%[(.-)%]%]</i>.-</li>"
        -- A wikilink is present, discard surrounding text
    else
        LIPattern = "<li>.-%[%[(.-)%]%].-</li>"
    LIPattern = "<li>.-%[%[(.-)%]%].-</li>"
        end
    end
    ]=]
   
    LIPattern = "<li>.-%[%[(.-)%]%].-</li>"
    
    
     -- Determine if property is Assignment, so process a string like:
     -- Determine if property is Assignment, so process a string like:
Riga 359: Riga 362:
local Character
local Character
local Performer
local Performer
--Remove italic
FullRow = string.gsub(FullRow, "<i>", "")
    FullRow = string.gsub(FullRow, "</i>", "")
--print (FullRow)
--print (FullRow)
local CountLiks = select(2, string.gsub(FullRow, "%[%[", ""))
local CountLiks = select(2, string.gsub(FullRow, "%[%[", ""))