forked from ungleich-public/cdist
		
	[__line/state] Make sure the index match is at the beginning
Without the == 1 all lines which contain --line as a substring match. e.g. if --line is "line" and the file contains the line "wrong line" this was considered a match.
This commit is contained in:
		
					parent
					
						
							
								629d0795c8
							
						
					
				
			
			
				commit
				
					
						4cdb8aaa03
					
				
			
		
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -49,7 +49,7 @@ function _find(_text, _pattern) {
 | 
			
		|||
   if (needle == "regex") {
 | 
			
		||||
      return match(_text, _pattern)
 | 
			
		||||
   } else {
 | 
			
		||||
      return index(_text, _pattern)
 | 
			
		||||
      return index(_text, _pattern) == 1
 | 
			
		||||
   }
 | 
			
		||||
}
 | 
			
		||||
BEGIN {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue