lib/linguist/heuristics.rb in github-linguist-4.7.3 vs lib/linguist/heuristics.rb in github-linguist-4.7.4
- old
+ new
@@ -274,23 +274,23 @@
Language["PHP"]
end
end
disambiguate ".pl" do |data|
- if /^(use v6|(my )?class|module)/.match(data)
- Language["Perl6"]
+ if /^[^#]+:-/.match(data)
+ Language["Prolog"]
elsif /use strict|use\s+v?5\./.match(data)
Language["Perl"]
- elsif /^[^#]+:-/.match(data)
- Language["Prolog"]
+ elsif /^(use v6|(my )?class|module)/.match(data)
+ Language["Perl6"]
end
end
disambiguate ".pm", ".t" do |data|
- if /^(use v6|(my )?class|module)/.match(data)
- Language["Perl6"]
- elsif /use strict|use\s+v?5\./.match(data)
+ if /use strict|use\s+v?5\./.match(data)
Language["Perl"]
+ elsif /^(use v6|(my )?class|module)/.match(data)
+ Language["Perl6"]
end
end
disambiguate ".pro" do |data|
if /^[^#]+:-/.match(data)