From ae421769536ce4a2e203f3e15208030c78cffc96 Mon Sep 17 00:00:00 2001 From: rxi Date: Thu, 7 May 2020 14:18:46 +0100 Subject: [PATCH] Renamed `common.matches_pattern` => `common.match_pattern` --- data/core/common.lua | 4 ++-- data/core/syntax.lua | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/data/core/common.lua b/data/core/common.lua index d83a7afc..6e8c65ed 100644 --- a/data/core/common.lua +++ b/data/core/common.lua @@ -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 diff --git a/data/core/syntax.lua b/data/core/syntax.lua index ddc1b2f2..fe8cc862 100644 --- a/data/core/syntax.lua +++ b/data/core/syntax.lua @@ -14,7 +14,7 @@ end function syntax.get(filename) for i = #syntax.items, 1, -1 do local t = syntax.items[i] - if common.matches_pattern(filename, t.files) then + if common.match_pattern(filename, t.files) then return t end end