Diferencia entre revisiones de «Módulo:Wikidata»

mSin resumen de edición
mSin resumen de edición
Línea 273: Línea 273:
         return
         return
     end
     end
--COMPARA CADA ITEM CON UNA CADENA DADA PARA ELIMINARLA
     if opciones.eliminar then
     if opciones.eliminar then
     for clave, valor in pairs(formatoDeclaraciones) do
     for clave, valor in pairs(formatoDeclaraciones) do
  if opciones.eliminar1 then comparar1=mw.ustring.find(valor,opciones.eliminar1) end
    if mw.ustring.find(valor,opciones.eliminar) then
    if opciones.eliminar2 then comparar2=mw.ustring.find(valor,opciones.eliminar2) end
table.remove(formatoDeclaraciones,clave)
    if opciones.eliminar3 then comparar3= mw.ustring.find(valor,opciones.eliminar3) end
elseif opciones.eliminar1 then  
  if mw.ustring.find(valor,opciones.eliminar) or comparar1
  if mw.ustring.find(valor,opciones.eliminar1) then
  or comparar2 or comparar3  then
  table.remove(formatoDeclaraciones,clave)
table.remove(formatoDeclaraciones,clave)
  end
  elseif opciones.eliminar2 then  
  if mw.ustring.find(valor,opciones.eliminar2) then
  table.remove(formatoDeclaraciones,clave)
  end
    elseif opciones.eliminar3 then
    if mw.ustring.find(valor,opciones.eliminar3) then
table.remove(formatoDeclaraciones,clave)
end
end
end
end   
end