From 920f82549603b6d8e72bb1602bd842a784961529 Mon Sep 17 00:00:00 2001 From: John Gardner Date: Tue, 14 Jun 2016 05:11:56 +1000 Subject: [PATCH] Add heuristic for Perl6 and Turing (#3049) --- lib/linguist/heuristics.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/linguist/heuristics.rb b/lib/linguist/heuristics.rb index 1b2332b5..fc294192 100644 --- a/lib/linguist/heuristics.rb +++ b/lib/linguist/heuristics.rb @@ -391,6 +391,14 @@ module Linguist end end + disambiguate ".t" do |data| + if /^\s*%|^\s*var\s+\w+\s*:\s*\w+/.match(data) + Language["Turing"] + elsif /^\s*use\s+v6\s*;/.match(data) + Language["Perl6"] + end + end + disambiguate ".toc" do |data| if /^## |@no-lib-strip@/.match(data) Language["World of Warcraft Addon Data"]