Skip to content

Commit 44db079

Browse files
committed
Made tests more comprehensive and added ability of e or E and + or -
1 parent 8ccc33b commit 44db079

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

TypeScript.YAML-tmLanguage

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -631,7 +631,7 @@ repository:
631631

632632
numeric-literal:
633633
name: constant.numeric.ts
634-
match: \b(?<=[^$])((0(x|X)[0-9a-fA-F]+)|(([0-9]+(\.[0-9]+)?))(e[0-9]+(\.[0-9]+)?)?)\b
634+
match: \b(?<=[^$])((0(x|X)[0-9a-fA-F]+)|(([0-9]+(\.[0-9]+)?))([eE]([+-]?)[0-9]+(\.[0-9]+)?)?)\b
635635

636636
boolean-literal:
637637
name: constant.language.boolean.ts

TypeScript.tmLanguage

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -869,7 +869,7 @@
869869
<key>numeric-literal</key>
870870
<dict>
871871
<key>match</key>
872-
<string>\b(?&lt;=[^$])((0(x|X)[0-9a-fA-F]+)|(([0-9]+(\.[0-9]+)?))(e[0-9]+(\.[0-9]+)?)?)\b</string>
872+
<string>\b(?&lt;=[^$])((0(x|X)[0-9a-fA-F]+)|(([0-9]+(\.[0-9]+)?))([eE]([+-]?)[0-9]+(\.[0-9]+)?)?)\b</string>
873873
<key>name</key>
874874
<string>constant.numeric.ts</string>
875875
</dict>

TypeScriptReact.YAML-tmLanguage

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -619,7 +619,7 @@ repository:
619619

620620
numeric-literal:
621621
name: constant.numeric.tsx
622-
match: \b(?<=[^$])((0(x|X)[0-9a-fA-F]+)|(([0-9]+(\.[0-9]+)?))(e[0-9]+(\.[0-9]+)?)?)\b
622+
match: \b(?<=[^$])((0(x|X)[0-9a-fA-F]+)|(([0-9]+(\.[0-9]+)?))([eE]([+-]?)[0-9]+(\.[0-9]+)?)?)\b
623623

624624
boolean-literal:
625625
name: constant.language.boolean.tsx

TypeScriptReact.tmLanguage

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1235,7 +1235,7 @@
12351235
<key>numeric-literal</key>
12361236
<dict>
12371237
<key>match</key>
1238-
<string>\b(?&lt;=[^$])((0(x|X)[0-9a-fA-F]+)|(([0-9]+(\.[0-9]+)?))(e[0-9]+(\.[0-9]+)?)?)\b</string>
1238+
<string>\b(?&lt;=[^$])((0(x|X)[0-9a-fA-F]+)|(([0-9]+(\.[0-9]+)?))([eE]([+-]?)[0-9]+(\.[0-9]+)?)?)\b</string>
12391239
<key>name</key>
12401240
<string>constant.numeric.tsx</string>
12411241
</dict>

0 commit comments

Comments
 (0)