Fix .ts heuristic rule (#3171)

Use the opening TS tag instead of the closing tag since
the closing tag might be at the end of the file,
after the max number of lines we read with a LazyBlob
This commit is contained in:
Paul Chaignon
2016-08-27 21:01:58 +02:00
committed by GitHub
parent 5c3744dfd6
commit 6763b73d9c

View File

@@ -430,7 +430,7 @@ module Linguist
end
disambiguate ".ts" do |data|
if data.include?("</TS>")
if data.include?("<TS")
Language["XML"]
else
Language["TypeScript"]