mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
Updating heuristic order
This commit is contained in:
@@ -160,11 +160,17 @@ module Linguist
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
disambiguate "M", "Matlab", "Mathematica", "Mercury", "Objective-C" do |data|
|
disambiguate "M", "Mathematica", "Matlab", "Mercury", "Objective-C" do |data|
|
||||||
if (/^[ \t]*@(interface|class|protocol|property|end|synchronised|selector|implementation)\b/.match(data))
|
if /^[ \t]*@(interface|class|protocol|property|end|synchronised|selector|implementation)\b/.match(data)
|
||||||
Language["Objective-C"]
|
Language["Objective-C"]
|
||||||
|
elsif data.include?(":- module")
|
||||||
# TODO add matchers for "M", "Matlab", "Mathematica", "Mercury"
|
Language["Mercury"]
|
||||||
|
elsif /^\s*;/.match(data)
|
||||||
|
Language["M"]
|
||||||
|
elsif /^\s*\(\*/.match(data)
|
||||||
|
Language["Mathematica"]
|
||||||
|
elsif /^\s*%/.match(data)
|
||||||
|
Language["Matlab"]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user