markdown_prose_hooks/lib.rs
1//! Conservatively remove manual line breaks from Markdown prose.
2//!
3//! A second implementation of the unwrap, answering to the same conformance
4//! corpus as the Python one in `src/markdown_prose_hooks/`. The corpus is the
5//! specification; neither implementation is.
6
7pub mod cli;
8pub mod code_span;
9pub mod fuzz;
10pub mod ignore;
11pub mod label;
12pub mod links;
13pub mod paragraph;
14pub mod scan;
15pub mod transcript;
16
17pub use paragraph::unwrap_markdown_prose;
18
19/// Result of applying the Markdown prose unwrap pass.
20#[derive(Debug, Clone, PartialEq, Eq)]
21pub struct UnwrapResult {
22 /// The rewritten document.
23 pub content: String,
24 /// How many paragraphs were joined.
25 pub paragraphs_unwrapped: usize,
26 /// How many manual line breaks were removed.
27 pub line_breaks_removed: usize,
28}