mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
Improve Prolog .pro heuristic to avoid false positives (#3931)
The `[a:-b]` syntax for index selection in arrays is valid in IDL and matches the heuristic for Prolog. Update the Prolog heuristic to exclude `[`.
This commit is contained in:
@@ -379,7 +379,7 @@ module Linguist
|
|||||||
end
|
end
|
||||||
|
|
||||||
disambiguate ".pro" do |data|
|
disambiguate ".pro" do |data|
|
||||||
if /^[^#]+:-/.match(data)
|
if /^[^\[#]+:-/.match(data)
|
||||||
Language["Prolog"]
|
Language["Prolog"]
|
||||||
elsif data.include?("last_client=")
|
elsif data.include?("last_client=")
|
||||||
Language["INI"]
|
Language["INI"]
|
||||||
|
|||||||
Reference in New Issue
Block a user