From 9da42fba5b70167dc760e6e6ae7b03f1aa0d46d8 Mon Sep 17 00:00:00 2001 From: vitaut Date: Thu, 16 Apr 2015 15:19:22 -0700 Subject: [PATCH] Improve NL/NewLisp disambiguation heuristic NL files start with either 'b' or 'g' followed by an unsigned integer. --- lib/linguist/heuristics.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/linguist/heuristics.rb b/lib/linguist/heuristics.rb index b1adbd18..e342e616 100644 --- a/lib/linguist/heuristics.rb +++ b/lib/linguist/heuristics.rb @@ -275,7 +275,7 @@ module Linguist end disambiguate "NL", "NewLisp" do |data| - if /^g3 /.match(data) + if /^(b|g)[0-9]+ /.match(data) Language["NL"] else Language["NewLisp"]