Skip to content

Commit bc6e2c8

Browse files
vicasaslildude
andauthored
Update heuristics to fallback to TSX language if .tsx file is not XML (#7049)
Fix syntax highlighting for .tsx files in the TSX language Co-authored-by: Colin Seymour <[email protected]>
1 parent 4321806 commit bc6e2c8

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/linguist/heuristics.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -786,10 +786,9 @@ disambiguations:
786786
- language: Scilab
787787
- extensions: ['.tsx']
788788
rules:
789-
- language: TSX
790-
pattern: '^\s*(import.+(from\s+|require\()[''"]react|\/\/\/\s*<reference\s)'
791789
- language: XML
792790
pattern: '(?i:^\s*<\?xml\s+version)'
791+
- language: TSX
793792
- extensions: ['.txt']
794793
rules:
795794
# The following RegExp is simply a collapsed and simplified form of the

0 commit comments

Comments
 (0)