mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-12-08 20:38:47 +00:00
Heuristic for PicoLisp.
This commit is contained in:
@@ -290,13 +290,15 @@ module Linguist
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
disambiguate "Common Lisp", "Lex", "Groff" do |data|
|
disambiguate "Common Lisp", "Lex", "Groff", "PicoLisp" do |data|
|
||||||
if data.include?("(def(un|macro)\s")
|
if /\(def(un|macro)\s/.match(data)
|
||||||
Language["Common Lisp"]
|
Language["Common Lisp"]
|
||||||
elsif /^(%[%{}]xs|<.*>)/.match(data)
|
elsif /^(%[%{}]xs|<.*>)/.match(data)
|
||||||
Language["Lex"]
|
Language["Lex"]
|
||||||
elsif /^\.[a-z][a-z](\s|$)/i.match(data)
|
elsif /^\.[a-z][a-z](\s|$)/i.match(data)
|
||||||
Language["Groff"]
|
Language["Groff"]
|
||||||
|
elsif /^\((de|class|rel|code|data|must)\s/.match(data)
|
||||||
|
Language["PicoLisp"]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user