File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
Expand file tree Collapse file tree 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,
367367 if dedented_line. starts_with ( "```" ) {
368368 is_in_code_block = !is_in_code_block;
369369 text. push_str ( & line[ ..( indent_level+3 ) ] ) ;
370- text. push ( '\n' ) ;
371370 } else if is_in_code_block && dedented_line. starts_with ( "# " ) {
372371 continue ;
373372 } else {
374373 text. push_str ( line) ;
375- text. push ( '\n' ) ;
376374 }
375+ text. push ( '\n' ) ;
377376 }
378377
379378 show_content_with_pager ( & text) ;
@@ -385,7 +384,7 @@ fn handle_explain(code: &str,
385384}
386385
387386fn 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) {
389388 OsString :: from ( "more.com" )
390389 } else {
391390 OsString :: from ( "less" )
You can’t perform that action at this time.
0 commit comments