mirror of
https://github.com/KevinMidboe/linguist.git
synced 2026-01-16 22:35:40 +00:00
Improve heuristic for XML/TypeScript (#3883)
The heuristic for XML .ts files might match TypeScript generics starting with TS
This commit is contained in:
@@ -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"]
|
||||
|
||||
Reference in New Issue
Block a user