From bfaa8e3c74aa82d2ad6a5b917af98f9e6cc729f8 Mon Sep 17 00:00:00 2001 From: YuKun Liu <41265098+mrxiaozhuox@users.noreply.github.com> Date: Sat, 9 Jul 2022 20:54:16 +0800 Subject: [PATCH] feat: commit code --- src/server/mod.rs | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/src/server/mod.rs b/src/server/mod.rs index 614e8fa7a..e5bffc17e 100644 --- a/src/server/mod.rs +++ b/src/server/mod.rs @@ -518,24 +518,6 @@ fn print_console_info(port: u16, config: &CrateConfig, options: PrettierOptions) format!("{}~{}", line.0, line.1) }; let code = span.text.clone(); - // let span_info = format!( - // "[{}: {}]: {} --> {}", - // file, - // if line.0 == line.1 { - // line.0.to_string() - // } else { - // format!("{}~{}", line.0, line.1) - // }, - // if code.len() == 1 { - // code.get(0).unwrap().text.trim().blue().bold().to_string() - // } else { - // format!("\n{}",code.iter() - // .enumerate() - // .map(|(_i, s)| format!("\t{}\n", s.text).blue().bold().to_string()) - // .collect::()) - // }, - // message.yellow().bold() - // ); let span_info = if code.len() == 1 { let code = code.get(0).unwrap().text.trim().blue().bold().to_string(); format!( @@ -551,7 +533,7 @@ fn print_console_info(port: u16, config: &CrateConfig, options: PrettierOptions) .enumerate() .map(|(_i, s)| format!("\t{}\n", s.text).blue().bold().to_string()) .collect::(); - format!("[{}: {}]:\n{}", file, line_str, code) + format!("[{}: {}]:\n{}\n#:{}", file, line_str, code, message) }; console = format!("{console}\n\t{span_info}"); }