diff --git a/tests/integration.rs b/tests/integration.rs index 1a80a138..5b29c072 100644 --- a/tests/integration.rs +++ b/tests/integration.rs @@ -674,6 +674,24 @@ fn test_wrap_footnote_with_inline_code() { common::assert_wrapped_list_item(&output, " [^code_note]: ", 2); } +/// Tests that footnotes with angle-bracketed URLs are wrapped correctly. +/// +/// Verifies that when a footnote line contains a URL enclosed in angle brackets, +/// the URL is moved to a new indented line beneath the footnote text. +#[test] +fn test_wrap_angle_bracket_url() { + let input = lines_vec![concat!( + "[^5]: Given When Then - Martin Fowler, accessed on 14 July 2025, ", + "" + )]; + let expected = lines_vec![ + "[^5]: Given When Then - Martin Fowler, accessed on 14 July 2025,", + " ", + ]; + let output = process_stream(&input); + assert_eq!(output, expected); +} + /// Checks that a sequence of footnotes is not altered by wrapping. /// /// This regression test ensures that the footnote collection remains