mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
Add heuristic to distinguish RUNOFF from Roff
This commit is contained in:
@@ -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"]
|
||||
|
||||
Reference in New Issue
Block a user