fix: add escaping characters to ignore patterns (#736)

This commit is contained in:
Ivan Sorokin 2024-10-20 21:27:58 +02:00 committed by GitHub
parent 36b23cef16
commit 2c33a894bb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -583,7 +583,7 @@ local function pattern_to_lua(pattern)
end
function M.parse_gitignore(gitignore_path)
local ignore_patterns = { ".git", ".worktree", "__pycache__", "node_modules" }
local ignore_patterns = { "%.git", "%.worktree", "__pycache__", "node_modules" }
local negate_patterns = {}
local file = io.open(gitignore_path, "r")
if not file then return ignore_patterns, negate_patterns end