Skip to content

Commit

Permalink
Format.
Browse files Browse the repository at this point in the history
  • Loading branch information
toots committed Jan 1, 2025
1 parent 9caef8c commit 0be682f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/lang/lang_string.ml
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ module Version = struct
let num = Re.Pcre.get_substring sub 1 in
let str = try Re.Pcre.get_substring sub 2 with _ -> "" in
let num =
let int_of_string s = if s = "x" then (-1) else int_of_string s in
let int_of_string s = if s = "x" then -1 else int_of_string s in
String.split_on_char '.' num |> List.map int_of_string
in
(num, str)
Expand Down
3 changes: 2 additions & 1 deletion tests/core/string_test.ml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
let () = assert ("aa\\\"bb" = Lang_string.escape_utf8_string "aa\"bb")

(* Bug #4287 *)
let () = ignore (Lang_string.Version.of_string "rolling-release-v2.3.x+git@2addd93da")
let () =
ignore (Lang_string.Version.of_string "rolling-release-v2.3.x+git@2addd93da")

0 comments on commit 0be682f

Please sign in to comment.