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 @@ -367,13 +367,12 @@ fn handle_explain(code: &str,
367
367
if dedented_line. starts_with ( "```" ) {
368
368
is_in_code_block = !is_in_code_block;
369
369
text. push_str ( & line[ ..( indent_level+3 ) ] ) ;
370
- text. push ( '\n' ) ;
371
370
} else if is_in_code_block && dedented_line. starts_with ( "# " ) {
372
371
continue ;
373
372
} else {
374
373
text. push_str ( line) ;
375
- text. push ( '\n' ) ;
376
374
}
375
+ text. push ( '\n' ) ;
377
376
}
378
377
379
378
show_content_with_pager ( & text) ;
@@ -385,7 +384,7 @@ fn handle_explain(code: &str,
385
384
}
386
385
387
386
fn show_content_with_pager ( content : & String ) {
388
- let pager_name = env:: var_os ( "PAGER" ) . unwrap_or ( if cfg ! ( windows) {
387
+ let pager_name = env:: var_os ( "PAGER" ) . unwrap_or_else ( || if cfg ! ( windows) {
389
388
OsString :: from ( "more.com" )
390
389
} else {
391
390
OsString :: from ( "less" )
You can’t perform that action at this time.
0 commit comments