mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
Improve the .pl Prolog heuristic rule (#3409)
:- can be directly at the start of a line
This commit is contained in:
committed by
Brandon Black
parent
1c4baf6dc2
commit
675cee1d72
@@ -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"]
|
||||||
|
|||||||
Reference in New Issue
Block a user