From 22609dc2974efc08bab6888228281a76dd636731 Mon Sep 17 00:00:00 2001 From: Alhadis Date: Thu, 21 Jul 2016 08:57:09 +1000 Subject: [PATCH] Add heuristic to distinguish RUNOFF from Roff --- lib/linguist/heuristics.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/linguist/heuristics.rb b/lib/linguist/heuristics.rb index 6f4ff997..28d14cb4 100644 --- a/lib/linguist/heuristics.rb +++ b/lib/linguist/heuristics.rb @@ -359,6 +359,14 @@ module Linguist end end + disambiguate ".rno" do |data| + if /^\.!|^\.end lit(?:eral)?\b/i.match(data) + Language["RUNOFF"] + elsif /^\.\\" /.match(data) + Language["Groff"] + end + end + disambiguate ".rpy" do |data| if /(^(import|from|class|def)\s)/m.match(data) Language["Python"]