You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: CHANGELOG.md
+5
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,11 @@
12
12
13
13
## master
14
14
15
+
#### :nail_care: Polish
16
+
17
+
- Prefer Core's `RegExp` when Core is open and completing for regexp functions. https://github.com/rescript-lang/rescript-vscode/pull/903
18
+
- Add `%re("")` to the completions list when completing in a position where a regexp value is expected. https://github.com/rescript-lang/rescript-vscode/pull/903
Copy file name to clipboardexpand all lines: analysis/tests/src/expected/CompletionPipeChain.res.txt
+18
Original file line number
Diff line number
Diff line change
@@ -553,3 +553,21 @@ Path Integer.t
553
553
"documentation": null
554
554
}]
555
555
556
+
Complete src/CompletionPipeChain.res 103:8
557
+
posCursor:[103:8] posNoWhite:[103:7] Found expr:[103:3->103:8]
558
+
Completable: Cpath Value[r]->la
559
+
Package opens Pervasives.JsxModules.place holder
560
+
Resolved opens 1 pervasives
561
+
ContextPath Value[r]->la
562
+
ContextPath Value[r]
563
+
Path r
564
+
CPPipe env:CompletionPipeChain
565
+
Path Js.Re.la
566
+
[{
567
+
"label": "Js.Re.lastIndex",
568
+
"kind": 12,
569
+
"tags": [],
570
+
"detail": "t => int",
571
+
"documentation": {"kind": "markdown", "value": "\n Returns the index where the next match will start its search. This property\n will be modified when the RegExp object is used, if the global (\"g\") flag is\n set.\n\n ```res example\n let re = %re(\"/ab*/g\")\n let str = \"abbcdefabh\"\n\n let break = ref(false)\n while !break.contents {\n switch Js.Re.exec_(re, str) {\n | Some(result) => Js.Nullable.iter(Js.Re.captures(result)[0], (. match_) => {\n let next = Belt.Int.toString(Js.Re.lastIndex(re))\n Js.log(\"Found \" ++ (match_ ++ (\". Next match starts at \" ++ next)))\n })\n | None => break := true\n }\n }\n ```\n\n See\n [`RegExp: lastIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/lastIndex)\n on MDN.\n"}
0 commit comments