Ir al contenido

Diferencia entre revisiones de «Módulo:Citas»

184 bytes añadidos ,  21 jun 2024
sin resumen de edición
m (Cambió la configuración de protección de «Módulo:Citas»: Módulo o plantilla muy utilizado/sensible ([Editar=Permitir solo editores de plantillas y administradores] (indefinido)))
Sin resumen de edición
 
(No se muestran 4 ediciones intermedias de 2 usuarios)
Línea 276: Línea 276:
     elseif mw.title.getCurrentTitle():inNamespaces(0, 100, 104) and
     elseif mw.title.getCurrentTitle():inNamespaces(0, 100, 104) and
     not mw.title.getCurrentTitle().text:match('Wikipedia') and
     not mw.title.getCurrentTitle().text:match('Wikipedia') and
     URL:match('//[%a%.%-]+%.wikipedia%.org') then
     URL:match('//wiki.reinosmc.net') then
     error_str = seterror( 'bad_url_autorreferencia', {}, false, " " ) .. error_str;
     error_str = seterror( 'bad_url_autorreferencia', {}, false, " " ) .. error_str;
     end
     end
Línea 419: Línea 419:
local text;
local text;


if id:match("^PMC%d") then
id = id:sub(4, j) -- remove 'PMC' preffix if given
end
if id:match("[^%d]") then -- if PMC has anything but digits
if id:match("[^%d]") then -- if PMC has anything but digits
err_cat = ' ' .. seterror( 'bad_pmc' ); -- set an error message
err_cat = ' ' .. seterror( 'bad_pmc' ); -- set an error message
Línea 594: Línea 597:
     while true do
     while true do
pattern = pages:match("%[([%w/:\.]+%s+)[%w%d].*%]"); -- pattern is the opening bracket, the url and following space(s): "[url "
    local urlPattern = "%[%w*:?//[^ ]+%s+([%w%d].*)%]"
if nil == pattern then break; end -- no more urls
local urlMatch = pages:match(urlPattern); -- pattern is the opening bracket, the url and following space(s): "[url "
pages = pages:gsub(pattern, ""); -- remove as many instances of pattern as possible
if nil == urlMatch then break; end -- no more urls
pages = pages:gsub(urlPattern, "%1"); -- remove as many instances of pattern as possible
end
end
pages = pages:gsub("[%[%]]", ""); -- remove the brackets
pages = pages:gsub("[%[%]]", ""); -- remove the brackets
Línea 2095: Línea 2099:
           PostScript = ""
           PostScript = ""
           end
           end
if TransQuote and TransQuote ~= '' then
           Quote = Quote .. " " .. wrap( 'trans-quoted-title', TransQuote );
           Quote = Quote .. " " .. wrap( 'trans-quoted-title', TransQuote );
           TransQuote = wrap( 'trans-quoted-title', TransQuote );
           TransQuote = wrap( 'trans-quoted-title', TransQuote );
end
         Quote = sepc .." " .. wrap( 'quoted-text', Quote );  
         Quote = sepc .." " .. wrap( 'quoted-text', Quote );  
     end
     end