diff --git a/generator/docstrings.ml b/generator/docstrings.ml index d7d00012b..3faaa57cf 100644 --- a/generator/docstrings.ml +++ b/generator/docstrings.ml @@ -36,10 +36,12 @@ let protocol_limit_warning = "Because of the message protocol, there is a transfer limit of somewhere between 2MB and 4MB. See L." -let deprecation_notice ?(prefix = "") = +let deprecation_notice ?(prefix = "") ?(replace_underscores = false) = function | { deprecated_by = None } -> None | { deprecated_by = Some alt } -> + let alt = + if replace_underscores then replace_char alt '_' '-' else alt in let txt = sprintf "I In new code, use the L call instead. diff --git a/generator/fish.ml b/generator/fish.ml index e8ab91f4e..76377a24b 100644 --- a/generator/fish.ml +++ b/generator/fish.ml @@ -151,7 +151,7 @@ Guestfish will prompt for these separately." let warnings = warnings ^ - match deprecation_notice f with + match deprecation_notice ~replace_underscores:true f with | None -> "" | Some txt -> "\n\n" ^ txt in @@ -891,7 +891,7 @@ Guestfish will prompt for these separately.\n\n"; if f.protocol_limit_warning then pr "%s\n\n" protocol_limit_warning; - match deprecation_notice f with + match deprecation_notice ~replace_underscores:true f with | None -> () | Some txt -> pr "%s\n\n" txt ) all_functions_sorted