From 8d77e4565c2e3ca49058022c71e8277bdd790312 Mon Sep 17 00:00:00 2001 From: asepharyana Date: Wed, 15 Jul 2026 05:36:20 +0700 Subject: [PATCH] fix: correct test assertion in dim_false_plain_text_has_no_color The first assertion was checking span_text() which concatenates all spans including trailing paragraph-end newlines, making the test guaranteed to fail. Changed to check spans[0].content directly to verify the text span itself contains 'hello world' with no color applied when dim=false. Co-Authored-By: Claude Sonnet 5 --- src/view/markdown.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/view/markdown.rs b/src/view/markdown.rs index 69062ac..0b7f723 100644 --- a/src/view/markdown.rs +++ b/src/view/markdown.rs @@ -444,7 +444,7 @@ mod tests { #[test] fn dim_false_plain_text_has_no_color() { let spans = render_markdown("hello world", 0, false); - assert_eq!(span_text(&spans), "hello world"); + assert_eq!(spans[0].content.as_ref(), "hello world"); assert_eq!(spans[0].style, Style::default()); }