Módulo:ABNT: mudanças entre as edições

Ir para navegação Ir para pesquisar
imported>Jaideraf
Sem resumo de edição
imported>Jaideraf
Sem resumo de edição
local agents={}
if #creator >= 1 or #contributor >= 1 then
if creator ~= '' then
table.insert(agents, creator) -- como criador vem do campo 1XX, não há mais de um valor
end
 
for v in string.gmatch(contributor, "([^;]+)") do -- como colaborador vem do campo 7XX, pode haver mais de um valor
table.insert(agents, v)
end
end
for k, v in pairs(agents) do
if string.match( v, '^(.*)%s%(') then
-- 'Tolkien, J. R. R. (John Ronald Reuel), 1892-1973' > 'Tolkien, J. R. R.'
agents[k] = string.match( v, '^(.*)%s%(')
end
end
 
-- Retirar pontos repetidos
reference = string.gsub( reference, '%.%.', '.')
-- Retirar ponto e vírgula iniciais
reference = string.gsub( reference, '^(;%s)', '')
-- Exibe a referência
return reference