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

Ir para navegação Ir para pesquisar
+ regras
(fixing lua-language-server complains)
(+ regras)
if string.match(f100a, "[a-zÀ-ü],[A-ZÀ-ü]") then
a = "Falta espaço após a vírgula. Verifique o campo 100"
info = string.format('* <strong class="error">%s.</strong>', a)
table.insert(infos, info)
end
if string.match(f100a, "%d%d%d%d") then
a = "No campo 100, o ano deve ser informado no subcampo $d."
info = string.format('* <strong class="error">%s.</strong>', a)
table.insert(infos, info)
if string.match(f300b, "il%. ?; p&b") then
a = "'Ilustrações pretas e brancas' (il. p&b) é uma expressão só, remova o ponto e vírgula da expressão"
info = string.format('* <strong class="error">%s.</strong>', a)
table.insert(infos, info)
end
-- Testa se os itens do subcampo $b estão separados por ponto e vírgula
if string.match(f300b, "il%.%s?; gr[aá]f") then
a = "No campo 300, $b, os itens devem ser separados por vírgulas (il., gráfs.)"
info = string.format('* <strong class="error">%s.</strong>', a)
table.insert(infos, info)
if string.match(f600a, "[a-zÀ-ü],[A-ZÀ-ü]") then
a = "Falta espaço após a vírgula. Verifique o campo 600"
info = string.format('* <strong class="error">%s.</strong>', a)
table.insert(infos, info)
end
if string.match(f600a, "%d%d%d%d") then
a = "No campo 600, o ano deve ser informado no subcampo $d."
info = string.format('* <strong class="error">%s.</strong>', a)
table.insert(infos, info)
if string.match(f700a, "[a-zÀ-ü],[A-ZÀ-ü]") then
a = "Falta espaço após a vírgula. Verifique o campo 700"
info = string.format('* <strong class="error">%s.</strong>', a)
table.insert(infos, info)
end
if string.match(f700a, "%d%d%d%d") then
a = "No campo 700, o ano deve ser informado no subcampo $d."
info = string.format('* <strong class="error">%s.</strong>', a)
table.insert(infos, info)
if not string.match(f700q, "^%(") then
a = "O subcampo $q do campo 700 necessita parênteses"
info = string.format('* <strong class="error">%s.</strong>', a)
table.insert(infos, info)
end
end
local f700e = frame:expandTemplate { title = "Select", args = { "700", "e", target } } or ""
if f700e ~= "" then
if string.match(f700, "[a-zA-ZÀ-ü0-9%]-]%s?%$e") then
a = "O subcampo $e do campo 700 deve ser precedido por uma vírgula"
info = string.format('* <strong class="error">%s.</strong>', a)
table.insert(infos, info)

Menu de navegação