Skip to content

Commit fe576f6

Browse files
committed
pick up another regex completion
1 parent 730789d commit fe576f6

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

analysis/src/CompletionBackEnd.ml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1452,6 +1452,7 @@ let rec completeTypedValue ?(typeArgContext : typeArgContext option) ~rawOpens
14521452
let completionItems =
14531453
match path with
14541454
| Pdot (Pdot (Pident {name = "Js"}, "Re", _), "t", _)
1455+
| Pdot (Pdot (Pident {name = "Stdlib"}, "RegExp", _), "t", _)
14551456
| Pdot (Pident {name = "RegExp"}, "t", _) ->
14561457
(* regexps *)
14571458
create "/<regexp>/g" ~insertText:"/$0/g" ~includesSnippets:true

tests/analysis_tests/tests/src/expected/CompletionExpressions.res.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1259,6 +1259,14 @@ ContextPath CArgument Value[mkStuff]($0)
12591259
ContextPath Value[mkStuff]
12601260
Path mkStuff
12611261
[{
1262+
"label": "/<regexp>/g",
1263+
"kind": 4,
1264+
"tags": [],
1265+
"detail": "Regular expression",
1266+
"documentation": null,
1267+
"insertText": "/$0/g",
1268+
"insertTextFormat": 2
1269+
}, {
12621270
"label": "Stdlib.RegExp.fromString()",
12631271
"kind": 12,
12641272
"tags": [],

0 commit comments

Comments
 (0)