Add heuristic to distinguish RUNOFF from Roff

This commit is contained in:
Alhadis
2016-07-21 08:57:09 +10:00
parent 93341be396
commit 22609dc297

View File

@@ -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"]