Skip to content

Commit 22609dc

Browse files
committed
Add heuristic to distinguish RUNOFF from Roff
1 parent 93341be commit 22609dc

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lib/linguist/heuristics.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,14 @@ def call(data)
359359
end
360360
end
361361

362+
disambiguate ".rno" do |data|
363+
if /^\.!|^\.end lit(?:eral)?\b/i.match(data)
364+
Language["RUNOFF"]
365+
elsif /^\.\\" /.match(data)
366+
Language["Groff"]
367+
end
368+
end
369+
362370
disambiguate ".rpy" do |data|
363371
if /(^(import|from|class|def)\s)/m.match(data)
364372
Language["Python"]

0 commit comments

Comments
 (0)