Merge branch 'master' into associate-heuristic-with-extension

Conflicts:
	lib/linguist/heuristics.rb
This commit is contained in:
Paul Chaignon
2015-06-18 21:54:59 +02:00
42 changed files with 1960 additions and 39 deletions

View File

@@ -302,12 +302,30 @@ module Linguist
end
disambiguate ".l" do |data|
if data.include?("(def(un|macro)\s")
if /\(def(un|macro)\s/.match(data)
Language["Common Lisp"]
elsif /^(%[%{}]xs|<.*>)/.match(data)
Language["Lex"]
elsif /^\.[a-z][a-z](\s|$)/.match(data)
elsif /^\.[a-z][a-z](\s|$)/i.match(data)
Language["Groff"]
elsif /^\((de|class|rel|code|data|must)\s/.match(data)
Language["PicoLisp"]
end
end
disambiguate "Groff", "Nemerle" do |data|
if /^[.']/.match(data)
Language["Groff"]
elsif /^(module|namespace|using)\s/.match(data)
Language["Nemerle"]
end
end
disambiguate "GAS", "Groff" do |data|
if /^[.'][a-z][a-z](\s|$)/i.match(data)
Language["Groff"]
elsif /((^|\s)move?[. ])|\.(include|globa?l)\s/.match(data)
Language["GAS"]
end
end
end