Renamed common.matches_pattern => common.match_pattern

This commit is contained in:
rxi
2020-05-07 14:18:46 +01:00
parent 7cdf7dc44f
commit ae42176953
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -102,12 +102,12 @@ function common.path_suggest(text)
end
function common.matches_pattern(text, pattern, ...)
function common.match_pattern(text, pattern, ...)
if type(pattern) == "string" then
return text:find(pattern, ...)
end
for _, p in ipairs(pattern) do
local s, e = common.matches_pattern(text, p, ...)
local s, e = common.match_pattern(text, p, ...)
if s then return s, e end
end
return false