fix: add escaping characters to ignore patterns (#736)
This commit is contained in:
		
							parent
							
								
									36b23cef16
								
							
						
					
					
						commit
						2c33a894bb
					
				@ -583,7 +583,7 @@ local function pattern_to_lua(pattern)
 | 
				
			|||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
function M.parse_gitignore(gitignore_path)
 | 
					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 negate_patterns = {}
 | 
				
			||||||
  local file = io.open(gitignore_path, "r")
 | 
					  local file = io.open(gitignore_path, "r")
 | 
				
			||||||
  if not file then return ignore_patterns, negate_patterns end
 | 
					  if not file then return ignore_patterns, negate_patterns end
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user