Adding Perl/Perl6 heuristic for '.t'

This commit is contained in:
Arfon Smith
2015-08-20 10:16:52 +01:00
parent 0624a9395c
commit a74f3b3e46
2 changed files with 12 additions and 2 deletions

View File

@@ -33,7 +33,7 @@ module Linguist
#
# Examples
#
# disambiguate "Perl", "Prolog" do |data|
# disambiguate ".pm" do |data|
# if data.include?("use strict")
# Language["Perl"]
# elsif /^[^#]+:-/.match(data)
@@ -102,7 +102,7 @@ module Linguist
end
end
disambiguate ".pm" do |data|
disambiguate ".pm", ".t" do |data|
if /^(use v6|(my )?class|module)/.match(data)
Language["Perl6"]
elsif /use strict|use\s+v?5\./.match(data)