Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 24 additions & 8 deletions tests/integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -742,18 +742,34 @@ fn test_wrap_footnote_with_inline_code() {
common::assert_wrapped_list_item(&output, " [^code_note]: ", 2);
}

/// Checks that a sequence of footnotes is not altered by wrapping.
///
/// This regression test ensures that the footnote collection remains
/// unchanged when passed to `process_stream`.
#[test]
fn test_wrap_footnote_collection() {
let input = vec![
"[^1]: <https://falcon.readthedocs.io>",
"[^2]: <https://asgi.readthedocs.io>",
"[^3]: <https://www.starlette.io>",
"[^4]: <https://www.starlette.io/websockets/>",
"[^5]: <https://channels.readthedocs.io>",
"[^6]: <https://channels.readthedocs.io/en/stable/topics/consumers.html>",
"[^7]: <https://fastapi.tiangolo.com/advanced/websockets/>",
"[^8]: <https://websockets.readthedocs.io>",
]
.into_iter()
.map(str::to_string)
.collect::<Vec<_>>();

let output = process_stream(&input);
assert_eq!(output, input);
}
Comment thread
coderabbitai[bot] marked this conversation as resolved.

#[test]
/// Verifies that short list items are not wrapped or altered by the stream processing logic.
///
/// Ensures that a single-line bullet list item remains unchanged after processing.
///
/// # Examples
///
/// ```
/// let input = vec!["- short item".to_string()];
/// let output = process_stream(&input);
/// assert_eq!(output, input);
/// ```
fn test_wrap_short_list_item() {
let input = vec!["- short item".to_string()];
let output = process_stream(&input);
Expand Down