From 3141f62c61b7124804ee50a6b32c18de65229fd7 Mon Sep 17 00:00:00 2001 From: berrysweet Date: Fri, 7 Jul 2023 23:48:48 +0200 Subject: [PATCH] feat: strip blank lines on output html --- src/main.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main.rs b/src/main.rs index 5c017e4..7a451e1 100644 --- a/src/main.rs +++ b/src/main.rs @@ -49,6 +49,8 @@ fn main() { match std::fs::create_dir_all(&out_dir) { Ok(()) => { + let html: Vec<&str> = html.lines().filter(|&line| !line.trim().is_empty()).collect(); + let html = html.join("\n"); let write = std::fs::write(out_path, html); match write { Ok(()) => println!("All done!"), -- libgit2 1.7.2