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 <noreply@anthropic.com>
This commit is contained in:
asepharyana
2026-07-15 06:32:57 +07:00
co-authored by Claude Sonnet 5
parent 683715cd7a
commit 8d77e4565c
+1 -1
View File
@@ -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());
}