Skip to content

Commit d63aae4

Browse files
committed
Fix incorrect detection of regexp and arithmetic operator
Fixes #806
1 parent f065e7e commit d63aae4

File tree

6 files changed

+317
-77
lines changed

6 files changed

+317
-77
lines changed

TypeScript.YAML-tmLanguage

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1665,7 +1665,7 @@ repository:
16651665
match: ===|!==|==|!=
16661666
- name: keyword.operator.relational.ts
16671667
match: <=|>=|<>|<|>
1668-
- match: (\!)\s*(/)(?![/*])
1668+
- match: (?<=[_$[:alnum:]])(\!)\s*(/)(?![/*])
16691669
captures:
16701670
'1': { name: keyword.operator.logical.ts }
16711671
'2': { name: keyword.operator.arithmetic.ts }

TypeScript.tmLanguage

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5419,7 +5419,7 @@
54195419
</dict>
54205420
<dict>
54215421
<key>match</key>
5422-
<string>(\!)\s*(/)(?![/*])</string>
5422+
<string>(?&lt;=[_$[:alnum:]])(\!)\s*(/)(?![/*])</string>
54235423
<key>captures</key>
54245424
<dict>
54255425
<key>1</key>

TypeScriptReact.tmLanguage

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5365,7 +5365,7 @@
53655365
</dict>
53665366
<dict>
53675367
<key>match</key>
5368-
<string>(\!)\s*(/)(?![/*])</string>
5368+
<string>(?&lt;=[_$[:alnum:]])(\!)\s*(/)(?![/*])</string>
53695369
<key>captures</key>
53705370
<dict>
53715371
<key>1</key>

0 commit comments

Comments
 (0)