Usuario anónimo
Diferencia entre revisiones de «Módulo:Citas»
fix
m (1 revisión importada) |
wikitves>-sasha- (fix) |
||
Línea 597: | Línea 597: | ||
while true do | while true do | ||
local urlPattern = "%[%w*:?//[^ ]+%s+([%w%d].*)%]" | |||
if nil == | local urlMatch = pages:match(urlPattern); -- pattern is the opening bracket, the url and following space(s): "[url " | ||
pages = pages:gsub( | 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 |