rsmarkdown_core/lib.rs
1//! `rsmarkdown-core` — streaming markdown core.
2//!
3//! Pipeline (mirrors `jinghaihan/vue-stream-markdown`'s markmend package):
4//!
5//! ```text
6//! raw content
7//! -> normalize (CRLF, trailing whitespace, LaTeX pre-processing)
8//! -> parse_markdown_into_blocks (streaming mode; single block in static mode)
9//! -> preprocess LAST block only (syntax self-healing: code/strong/emphasis/delete/
10//! task-list/link/table/inline-math/math/html/footnote)
11//! -> parse each block to AST (LRU-cached, only the tail block is new)
12//! -> Renderer trait (display adapters implement this)
13//! ```
14//!
15//! The core crate has zero terminal/display dependencies.
16
17pub mod ast;
18pub mod blocks;
19pub mod fix;
20#[cfg(test)]
21mod generated_tests;
22pub mod parse;
23pub mod pattern;
24pub mod preprocess;
25pub mod processor;
26pub mod renderer;
27pub mod scan;
28
29pub use ast::{Alignment, Ast, Block, Inline, ListItem};
30pub use preprocess::PreprocessOptions;
31pub use processor::{BlockResult, CacheStats, Document, MarkdownProcessor, Mode, ProcessorOptions};
32pub use renderer::{NullRenderer, Renderer};