Improve the .pl Prolog heuristic rule (#3409)

:- can be directly at the start of a line
This commit is contained in:
Paul Chaignon
2017-01-03 22:54:47 +01:00
committed by Brandon Black
parent 1c4baf6dc2
commit 675cee1d72

View File

@@ -326,7 +326,7 @@ module Linguist
end end
disambiguate ".pl" do |data| disambiguate ".pl" do |data|
if /^[^#]+:-/.match(data) if /^[^#]*:-/.match(data)
Language["Prolog"] Language["Prolog"]
elsif /use strict|use\s+v?5\./.match(data) elsif /use strict|use\s+v?5\./.match(data)
Language["Perl"] Language["Perl"]