mirror of
				https://github.com/KevinMidboe/linguist.git
				synced 2025-10-29 17:50:22 +00:00 
			
		
		
		
	Fix error when matching languages against heuristics: if no language, no heuristic rule should be used
This commit is contained in:
		| @@ -53,7 +53,7 @@ module Linguist | |||||||
|  |  | ||||||
|     # Internal: Check if this heuristic matches the candidate languages. |     # Internal: Check if this heuristic matches the candidate languages. | ||||||
|     def matches?(candidates) |     def matches?(candidates) | ||||||
|       candidates.all? { |l| @languages.include?(l.name) } |       candidates.any? && candidates.all? { |l| @languages.include?(l.name) } | ||||||
|     end |     end | ||||||
|  |  | ||||||
|     # Internal: Perform the heuristic |     # Internal: Perform the heuristic | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user