Improve heuristic for XML/TypeScript (#3883)

The heuristic for XML .ts files might match TypeScript generics
starting with TS
This commit is contained in:
Paul Chaignon
2017-11-04 11:16:44 +01:00
committed by GitHub
parent 1f5ed3b3fe
commit d968b0e9ee
2 changed files with 103 additions and 1 deletions

View File

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