lib/linguist/heuristics.rb in github-linguist-3.2.1 vs lib/linguist/heuristics.rb in github-linguist-3.3.0
- old
+ new
@@ -17,10 +17,13 @@
result = disambiguate_pl(data, languages)
end
if languages.all? { |l| ["ECL", "Prolog"].include?(l) }
result = disambiguate_ecl(data, languages)
end
+ if languages.all? { |l| ["IDL", "Prolog"].include?(l) }
+ result = disambiguate_pro(data, languages)
+ end
if languages.all? { |l| ["Common Lisp", "OpenCL"].include?(l) }
result = disambiguate_cl(data, languages)
end
return result
end
@@ -46,9 +49,19 @@
def self.disambiguate_ecl(data, languages)
matches = []
matches << Language["Prolog"] if data.include?(":-")
matches << Language["ECL"] if data.include?(":=")
+ matches
+ end
+
+ def self.disambiguate_pro(data, languages)
+ matches = []
+ if (data.include?(":-"))
+ matches << Language["Prolog"]
+ else
+ matches << Language["IDL"]
+ end
matches
end
def self.disambiguate_ts(data, languages)
matches = []