mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
fish: Replace '_' with '-' in deprecation cross-refs (thanks Olaf Hering).
This commit is contained in:
@@ -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<guestfs(3)/PROTOCOL LIMITS>."
|
||||
|
||||
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<This function is deprecated.>
|
||||
In new code, use the L</%s%s> call instead.
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user