File tree 1 file changed +2
-3
lines changed
1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -365,13 +365,12 @@ fn handle_explain(code: &str,
365
365
if dedented_line. starts_with ( "```" ) {
366
366
is_in_code_block = !is_in_code_block;
367
367
text. push_str ( & line[ ..( indent_level+3 ) ] ) ;
368
- text. push ( '\n' ) ;
369
368
} else if is_in_code_block && dedented_line. starts_with ( "# " ) {
370
369
continue ;
371
370
} else {
372
371
text. push_str ( line) ;
373
- text. push ( '\n' ) ;
374
372
}
373
+ text. push ( '\n' ) ;
375
374
}
376
375
377
376
show_content_with_pager ( & text) ;
@@ -383,7 +382,7 @@ fn handle_explain(code: &str,
383
382
}
384
383
385
384
fn show_content_with_pager ( content : & String ) {
386
- let pager_name = env:: var_os ( "PAGER" ) . unwrap_or ( if cfg ! ( windows) {
385
+ let pager_name = env:: var_os ( "PAGER" ) . unwrap_or_else ( || if cfg ! ( windows) {
387
386
OsString :: from ( "more.com" )
388
387
} else {
389
388
OsString :: from ( "less" )
You can’t perform that action at this time.
0 commit comments