Tighten up OCaml heuristic: only match at start of line.

This commit is contained in:
Lars Brinkhoff
2015-03-26 20:14:08 +01:00
parent ac4594e3b1
commit 3086326d12

View File

@@ -267,7 +267,7 @@ module Linguist
end
disambiguate "OCaml", "Standard ML" do |data|
if /module|let rec |match\s+(\S+\s)+with/.match(data)
if /(^\s*module)|let rec |match\s+(\S+\s)+with/.match(data)
Language["OCaml"]
elsif /=> |case\s+(\S+\s)+of/.match(data)
Language["Standard ML"]