mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 09:40:21 +00:00
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:
@@ -430,7 +430,7 @@ module Linguist
|
||||
end
|
||||
|
||||
disambiguate ".ts" do |data|
|
||||
if data.include?("</TS>")
|
||||
if data.include?("<TS")
|
||||
Language["XML"]
|
||||
else
|
||||
Language["TypeScript"]
|
||||
|
||||
Reference in New Issue
Block a user