fix lua path matching again

This commit is contained in:
kiyan42
2020-06-01 16:06:23 +02:00
parent 5b69702a52
commit df0c522a81
3 changed files with 12 additions and 10 deletions

7
lua/lib/utils.lua Normal file
View File

@@ -0,0 +1,7 @@
local M = {}
function M.path_to_matching_str(path)
return path:gsub('(%-)', '(%%-)'):gsub('(%.)', '(%%.)'):gsub('(%_)', '(%%_)')
end
return M