From c2ab813e3a08fb31c92bc749c3ebd4e630eff9c0 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Mon, 19 Feb 2024 20:17:25 -0600 Subject: [PATCH] fix(svg): Each ensure should have a blank line between --- crates/anstyle-svg/src/lib.rs | 4 +++- crates/anstyle-svg/tests/rainbow.svg | 1 + crates/anstyle-svg/tests/rg_linus.svg | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/crates/anstyle-svg/src/lib.rs b/crates/anstyle-svg/src/lib.rs index 5725e95b..d5ac83d0 100644 --- a/crates/anstyle-svg/src/lib.rs +++ b/crates/anstyle-svg/src/lib.rs @@ -202,14 +202,16 @@ impl Term { writeln!(&mut buffer, r#" line-height: {line_height}px;"#).unwrap(); writeln!(&mut buffer, r#" }}"#).unwrap(); writeln!(&mut buffer, r#" "#).unwrap(); + writeln!(&mut buffer).unwrap(); + if self.background { writeln!( &mut buffer, r#" "# ) .unwrap(); + writeln!(&mut buffer).unwrap(); } - writeln!(&mut buffer).unwrap(); let text_x = self.padding_px; let mut text_y = self.padding_px + line_height; diff --git a/crates/anstyle-svg/tests/rainbow.svg b/crates/anstyle-svg/tests/rainbow.svg index fcc545e6..2309a39c 100644 --- a/crates/anstyle-svg/tests/rainbow.svg +++ b/crates/anstyle-svg/tests/rainbow.svg @@ -790,6 +790,7 @@ line-height: 18px; } + diff --git a/crates/anstyle-svg/tests/rg_linus.svg b/crates/anstyle-svg/tests/rg_linus.svg index b1444f13..132b1c02 100644 --- a/crates/anstyle-svg/tests/rg_linus.svg +++ b/crates/anstyle-svg/tests/rg_linus.svg @@ -15,6 +15,7 @@ line-height: 18px; } +