Skip to content

Commit a96bbd1

Browse files
committed
Fix syntax error in example
This was causing the API docs to fail to compile with: jscomp/others/js_re.mli : Syntax error in text: {[ (* Finds and prints successive matches *) let re = [%re "/ab*/g"] in let str = "abbcdefabh" in let break = ref false in while not !break do match re |> Js.Re.exec str with | None -> break := true | Some result -> Js.Nullable.iter (Js.Re.captures result).(0) ((fun match_ -> let next = string_of_int (Js.Re.lastIndex re) in Js.log ("Found " ^ match_ ^ ". Next match starts at " ^ next)) [ line 13, character 70: Js.log ("Found " ^ match_ ^ ". Next match starts at " ^ next)) [ ^ Signed-off-by: Zach Ploskey <zach@ploskey.com>
1 parent eb3c3fa commit a96bbd1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: jscomp/others/js_re.mli

+1-1
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ while not !break do
127127
| Some result ->
128128
Js.Nullable.iter (Js.Re.captures result).(0) ((fun match_ ->
129129
let next = string_of_int (Js.Re.lastIndex re) in
130-
Js.log ("Found " ^ match_ ^ ". Next match starts at " ^ next)) [@bs])
130+
Js.log ("Found " ^ match_ ^ ". Next match starts at " ^ next)))
131131
done
132132
]}
133133

0 commit comments

Comments
 (0)