File tree Expand file tree Collapse file tree 5 files changed +365
-63
lines changed Expand file tree Collapse file tree 5 files changed +365
-63
lines changed Original file line number Diff line number Diff line change @@ -1489,16 +1489,28 @@ repository:
1489
1489
- include : ' #string-character-escape'
1490
1490
1491
1491
regex :
1492
- name : string.regex.ts
1493
- begin : (?<=[=(:,\[?+!]|return|case|=>|&&|\|\||\*\/)\s*(/)(?![/*+?])(?=.*/)
1494
- beginCaptures :
1495
- ' 1 ' : {name: punctuation.definition.string.begin.ts}
1496
- end : (/)([gimuy]*)
1497
- endCaptures :
1498
- ' 1 ' : {name: punctuation.definition.string.end.ts}
1499
- ' 2 ' : {name: keyword.other.ts}
1500
1492
patterns :
1501
- - include : ' #regexp'
1493
+ - name : string.regex.ts
1494
+ begin : (?<=[=(:,\[?+!]|return|case|=>|&&|\|\||\*\/)\s*(/)(?![/*+?])(?=.*/)
1495
+ beginCaptures :
1496
+ ' 1 ' : {name: punctuation.definition.string.begin.ts}
1497
+ end : (/)([gimuy]*)
1498
+ endCaptures :
1499
+ ' 1 ' : {name: punctuation.definition.string.end.ts}
1500
+ ' 2 ' : {name: keyword.other.ts}
1501
+ patterns :
1502
+ - include : ' #regexp'
1503
+ # Check if complete regexp syntax
1504
+ - name : string.regex.ts
1505
+ begin : /(?![/*])(?=(?:[^/\\\[]|\\.|\[([^\]\\]|\\.)+\])+/(?![/*])[gimy]*(?!\s*[a-zA-Z0-9_$]))
1506
+ beginCaptures :
1507
+ ' 0 ' : {name: punctuation.definition.string.begin.ts}
1508
+ end : (/)([gimuy]*)
1509
+ endCaptures :
1510
+ ' 1 ' : {name: punctuation.definition.string.end.ts}
1511
+ ' 2 ' : {name: keyword.other.ts}
1512
+ patterns :
1513
+ - include : ' #regexp'
1502
1514
1503
1515
# regexp syntax is taken from https://github.com/atom/language-javascript/
1504
1516
regexp :
Original file line number Diff line number Diff line change 4185
4185
</dict >
4186
4186
<key >regex </key >
4187
4187
<dict >
4188
- <key >name </key >
4189
- <string >string.regex.ts </string >
4190
- <key >begin </key >
4191
- <string >(?< =[=(:,\[?+!]|return|case|=> |&& |\|\||\*\/)\s*(/)(?![/*+?])(?=.*/) </string >
4192
- <key >beginCaptures </key >
4193
- <dict >
4194
- <key >1 </key >
4195
- <dict >
4196
- <key >name </key >
4197
- <string >punctuation.definition.string.begin.ts </string >
4198
- </dict >
4199
- </dict >
4200
- <key >end </key >
4201
- <string >(/)([gimuy]*) </string >
4202
- <key >endCaptures </key >
4203
- <dict >
4204
- <key >1 </key >
4188
+ <key >patterns </key >
4189
+ <array >
4205
4190
<dict >
4206
4191
<key >name </key >
4207
- <string >punctuation.definition.string.end.ts </string >
4192
+ <string >string.regex.ts </string >
4193
+ <key >begin </key >
4194
+ <string >(?< =[=(:,\[?+!]|return|case|=> |&& |\|\||\*\/)\s*(/)(?![/*+?])(?=.*/) </string >
4195
+ <key >beginCaptures </key >
4196
+ <dict >
4197
+ <key >1 </key >
4198
+ <dict >
4199
+ <key >name </key >
4200
+ <string >punctuation.definition.string.begin.ts </string >
4201
+ </dict >
4202
+ </dict >
4203
+ <key >end </key >
4204
+ <string >(/)([gimuy]*) </string >
4205
+ <key >endCaptures </key >
4206
+ <dict >
4207
+ <key >1 </key >
4208
+ <dict >
4209
+ <key >name </key >
4210
+ <string >punctuation.definition.string.end.ts </string >
4211
+ </dict >
4212
+ <key >2 </key >
4213
+ <dict >
4214
+ <key >name </key >
4215
+ <string >keyword.other.ts </string >
4216
+ </dict >
4217
+ </dict >
4218
+ <key >patterns </key >
4219
+ <array >
4220
+ <dict >
4221
+ <key >include </key >
4222
+ <string >#regexp </string >
4223
+ </dict >
4224
+ </array >
4208
4225
</dict >
4209
- <key >2 </key >
4210
4226
<dict >
4211
4227
<key >name </key >
4212
- <string >keyword.other.ts </string >
4213
- </dict >
4214
- </dict >
4215
- <key >patterns </key >
4216
- <array >
4217
- <dict >
4218
- <key >include </key >
4219
- <string >#regexp </string >
4228
+ <string >string.regex.ts </string >
4229
+ <key >begin </key >
4230
+ <string >/(?![/*])(?=(?:[^/\\\[]|\\.|\[([^\]\\]|\\.)+\])+/(?![/*])[gimy]*(?!\s*[a-zA-Z0-9_$])) </string >
4231
+ <key >beginCaptures </key >
4232
+ <dict >
4233
+ <key >0 </key >
4234
+ <dict >
4235
+ <key >name </key >
4236
+ <string >punctuation.definition.string.begin.ts </string >
4237
+ </dict >
4238
+ </dict >
4239
+ <key >end </key >
4240
+ <string >(/)([gimuy]*) </string >
4241
+ <key >endCaptures </key >
4242
+ <dict >
4243
+ <key >1 </key >
4244
+ <dict >
4245
+ <key >name </key >
4246
+ <string >punctuation.definition.string.end.ts </string >
4247
+ </dict >
4248
+ <key >2 </key >
4249
+ <dict >
4250
+ <key >name </key >
4251
+ <string >keyword.other.ts </string >
4252
+ </dict >
4253
+ </dict >
4254
+ <key >patterns </key >
4255
+ <array >
4256
+ <dict >
4257
+ <key >include </key >
4258
+ <string >#regexp </string >
4259
+ </dict >
4260
+ </array >
4220
4261
</dict >
4221
4262
</array >
4222
4263
</dict >
Original file line number Diff line number Diff line change 4167
4167
</dict >
4168
4168
<key >regex </key >
4169
4169
<dict >
4170
- <key >name </key >
4171
- <string >string.regex.tsx </string >
4172
- <key >begin </key >
4173
- <string >(?< =[=(:,\[?+!]|return|case|=> |&& |\|\||\*\/)\s*(/)(?![/*+?])(?=.*/) </string >
4174
- <key >beginCaptures </key >
4175
- <dict >
4176
- <key >1 </key >
4177
- <dict >
4178
- <key >name </key >
4179
- <string >punctuation.definition.string.begin.tsx </string >
4180
- </dict >
4181
- </dict >
4182
- <key >end </key >
4183
- <string >(/)([gimuy]*) </string >
4184
- <key >endCaptures </key >
4185
- <dict >
4186
- <key >1 </key >
4170
+ <key >patterns </key >
4171
+ <array >
4187
4172
<dict >
4188
4173
<key >name </key >
4189
- <string >punctuation.definition.string.end.tsx </string >
4174
+ <string >string.regex.tsx </string >
4175
+ <key >begin </key >
4176
+ <string >(?< =[=(:,\[?+!]|return|case|=> |&& |\|\||\*\/)\s*(/)(?![/*+?])(?=.*/) </string >
4177
+ <key >beginCaptures </key >
4178
+ <dict >
4179
+ <key >1 </key >
4180
+ <dict >
4181
+ <key >name </key >
4182
+ <string >punctuation.definition.string.begin.tsx </string >
4183
+ </dict >
4184
+ </dict >
4185
+ <key >end </key >
4186
+ <string >(/)([gimuy]*) </string >
4187
+ <key >endCaptures </key >
4188
+ <dict >
4189
+ <key >1 </key >
4190
+ <dict >
4191
+ <key >name </key >
4192
+ <string >punctuation.definition.string.end.tsx </string >
4193
+ </dict >
4194
+ <key >2 </key >
4195
+ <dict >
4196
+ <key >name </key >
4197
+ <string >keyword.other.tsx </string >
4198
+ </dict >
4199
+ </dict >
4200
+ <key >patterns </key >
4201
+ <array >
4202
+ <dict >
4203
+ <key >include </key >
4204
+ <string >#regexp </string >
4205
+ </dict >
4206
+ </array >
4190
4207
</dict >
4191
- <key >2 </key >
4192
4208
<dict >
4193
4209
<key >name </key >
4194
- <string >keyword.other.tsx </string >
4195
- </dict >
4196
- </dict >
4197
- <key >patterns </key >
4198
- <array >
4199
- <dict >
4200
- <key >include </key >
4201
- <string >#regexp </string >
4210
+ <string >string.regex.tsx </string >
4211
+ <key >begin </key >
4212
+ <string >/(?![/*])(?=(?:[^/\\\[]|\\.|\[([^\]\\]|\\.)+\])+/(?![/*])[gimy]*(?!\s*[a-zA-Z0-9_$])) </string >
4213
+ <key >beginCaptures </key >
4214
+ <dict >
4215
+ <key >0 </key >
4216
+ <dict >
4217
+ <key >name </key >
4218
+ <string >punctuation.definition.string.begin.tsx </string >
4219
+ </dict >
4220
+ </dict >
4221
+ <key >end </key >
4222
+ <string >(/)([gimuy]*) </string >
4223
+ <key >endCaptures </key >
4224
+ <dict >
4225
+ <key >1 </key >
4226
+ <dict >
4227
+ <key >name </key >
4228
+ <string >punctuation.definition.string.end.tsx </string >
4229
+ </dict >
4230
+ <key >2 </key >
4231
+ <dict >
4232
+ <key >name </key >
4233
+ <string >keyword.other.tsx </string >
4234
+ </dict >
4235
+ </dict >
4236
+ <key >patterns </key >
4237
+ <array >
4238
+ <dict >
4239
+ <key >include </key >
4240
+ <string >#regexp </string >
4241
+ </dict >
4242
+ </array >
4202
4243
</dict >
4203
4244
</array >
4204
4245
</dict >
You can’t perform that action at this time.
0 commit comments