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,
-- just redirect to the target URL/URI
--
-- A match function to support PCRE and lua pattern
-- lua pattern will be deprecated in YunoHost
-- A match function that uses PCRE regex as default
-- If '%.' is found in the regex, we assume it's a LUA regex (legacy code)
function match(s, regex)
if not string.find(regex, '%%%.') then
if rex.match(s, regex) then
return true
end
elseif string.match(s,regex) then
elseif string.match(s,regex) then
return true
end
return false