Stdlib: do not use deprecated stringext
This commit is contained in:
parent
f8247ff6c9
commit
1cd82f5d82
@ -4,9 +4,8 @@
|
|||||||
((name tezos_stdlib)
|
((name tezos_stdlib)
|
||||||
(public_name tezos-stdlib)
|
(public_name tezos-stdlib)
|
||||||
(libraries (ocplib-endian.bigstring
|
(libraries (ocplib-endian.bigstring
|
||||||
cstruct
|
|
||||||
stringext
|
|
||||||
hex
|
hex
|
||||||
|
re
|
||||||
zarith
|
zarith
|
||||||
lwt
|
lwt
|
||||||
lwt.log))
|
lwt.log))
|
||||||
|
@ -18,6 +18,7 @@ module Infix = struct
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
let nbsp = Re.(compile (str "\xC2\xA0"))
|
||||||
let display_paragraph ppf description =
|
let display_paragraph ppf description =
|
||||||
Format.fprintf ppf "@[%a@]"
|
Format.fprintf ppf "@[%a@]"
|
||||||
(Format.pp_print_list ~pp_sep:Format.pp_print_newline
|
(Format.pp_print_list ~pp_sep:Format.pp_print_newline
|
||||||
@ -26,7 +27,7 @@ let display_paragraph ppf description =
|
|||||||
(fun ppf w ->
|
(fun ppf w ->
|
||||||
(* replace by real spaces... *)
|
(* replace by real spaces... *)
|
||||||
Format.fprintf ppf "%s@ "
|
Format.fprintf ppf "%s@ "
|
||||||
(Stringext.replace_all ~pattern:"\xC2\xA0" ~with_:" " w))
|
(Re.replace ~all:true nbsp ~f:(fun _ -> " ") w))
|
||||||
ppf
|
ppf
|
||||||
(TzString.split ' ' line)))
|
(TzString.split ' ' line)))
|
||||||
(TzString.split ~dup:false '\n' description)
|
(TzString.split ~dup:false '\n' description)
|
||||||
|
Loading…
Reference in New Issue
Block a user