Improve comment

This commit is contained in:
Alexandre Aubin 2018-12-14 00:31:54 +01:00 committed by GitHub
parent c3a9380361
commit 7dc84973df
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -188,14 +188,14 @@ end
-- If the URL matches one of the `redirected_urls` in the configuration file, -- If the URL matches one of the `redirected_urls` in the configuration file,
-- just redirect to the target URL/URI -- just redirect to the target URL/URI
-- --
-- A match function to support PCRE and lua pattern -- A match function that uses PCRE regex as default
-- lua pattern will be deprecated in YunoHost -- If '%.' is found in the regex, we assume it's a LUA regex (legacy code)
function match(s, regex) function match(s, regex)
if not string.find(regex, '%%%.') then if not string.find(regex, '%%%.') then
if rex.match(s, regex) then if rex.match(s, regex) then
return true return true
end end
elseif string.match(s,regex) then elseif string.match(s,regex) then
return true return true
end end
return false return false