Ir al contenido

Diferencia entre revisiones de «Módulo:Citas»

48 bytes añadidos ,  31 marzo
fix
m (1 revisión importada)
wikitves>-sasha-
(fix)
Línea 597: 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
Usuario anónimo