From 2d51a5dba48cddd5c940fff01f8165a4475253f1 Mon Sep 17 00:00:00 2001 From: Lars Brinkhoff Date: Wed, 7 Sep 2016 08:05:22 +0200 Subject: [PATCH] Recognise R comments in heuristic. --- 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 48b7e54f..ad4f4504 100644 --- a/lib/linguist/heuristics.rb +++ b/lib/linguist/heuristics.rb @@ -354,7 +354,7 @@ module Linguist disambiguate ".r" do |data| if /\bRebol\b/i.match(data) Language["Rebol"] - elsif data.include?("<-") + elsif /<-|^\s*#/.match(data) Language["R"] end end