File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -272,22 +272,17 @@ fn render_possible_values(out: &mut String, arg: &Arg) {
272272 }
273273 let flag = arg
274274 . get_long ( )
275- . map ( |long| format ! ( "\\ -\\ -{}" , roff_escape( long) ) )
275+ . map ( roff_escape)
276+ . map ( |long| format ! ( "\\ -\\ -{long}" ) )
276277 . unwrap_or_default ( ) ;
277278 out. push_str ( ".RS\n " ) ;
278279 for value in & possible_values {
279- let name = value. get_name ( ) ;
280- if let Some ( help) = value. get_help ( ) {
281- writeln ! (
282- out,
283- ".TP\n \\ fB{flag} {}\\ fR\n {}" ,
284- roff_escape( name) ,
285- roff_escape( & help. to_string( ) ) ,
286- )
287- . unwrap ( ) ;
288- } else {
289- writeln ! ( out, ".TP\n \\ fB{flag} {}\\ fR" , roff_escape( name) ) . unwrap ( ) ;
290- }
280+ let name = roff_escape ( value. get_name ( ) ) ;
281+ let help = value
282+ . get_help ( )
283+ . map ( |help| format ! ( "\n {}" , roff_escape( & help. to_string( ) ) ) )
284+ . unwrap_or_default ( ) ;
285+ writeln ! ( out, ".TP\n \\ fB{flag} {name}\\ fR{help}" ) . unwrap ( ) ;
291286 }
292287 out. push_str ( ".RE\n " ) ;
293288}
You can’t perform that action at this time.
0 commit comments