From 0334f10818292280ad99ee229140f615b19303cc Mon Sep 17 00:00:00 2001 From: Leynos Date: Fri, 18 Jul 2025 11:14:27 +0100 Subject: [PATCH 1/2] Add test for wrapping angle bracket URLs --- tests/integration.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/integration.rs b/tests/integration.rs index 1a80a138..ae8bc315 100644 --- a/tests/integration.rs +++ b/tests/integration.rs @@ -674,6 +674,20 @@ fn test_wrap_footnote_with_inline_code() { common::assert_wrapped_list_item(&output, " [^code_note]: ", 2); } +#[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 From a2821224fd4d58225d94f7394c9df5423e72b666 Mon Sep 17 00:00:00 2001 From: Leynos Date: Fri, 18 Jul 2025 14:06:37 +0100 Subject: [PATCH 2/2] Add documentation comment for the test Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- tests/integration.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/integration.rs b/tests/integration.rs index ae8bc315..5b29c072 100644 --- a/tests/integration.rs +++ b/tests/integration.rs @@ -674,6 +674,10 @@ 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!(