1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
//! `marco-core` is a pure-Rust Markdown engine with editor intelligence.
//!
//! Typical flow:
//! 1. Parse input text into an AST with [`parse`].
//! 2. Render the AST to HTML with [`render()`].
//! 3. Optionally run editor analysis via [`MarkdownIntelligenceProvider`].
//!
//! # Example
//! ```rust
//! let doc = marco_core::parse("# Hello")?;
//! let html = marco_core::render(&doc, &marco_core::RenderOptions::default())?;
//! assert!(html.contains("<h1"));
//! assert!(html.contains("Hello"));
//! # Ok::<(), Box<dyn std::error::Error>>(())
//! ```
/// The crate version from `Cargo.toml`, exposed for downstream UIs and diagnostics.
pub const VERSION: &str = env!;
/// Low-level Markdown grammar components (block and inline parsers).
/// Editor intelligence APIs such as diagnostics, highlights, completions, and TOC.
/// Utility logic such as UTF-8 sanitization and text helpers.
/// AST definitions and parser entry points.
/// HTML rendering and rendering options.
/// Main intelligence provider used by downstream editor integrations.
pub use MarkdownIntelligenceProvider;
/// Parse Markdown text into a [`Document`] AST using default options.
pub use parse;
/// Parse Markdown with explicit runtime options (position tracking, math, diagrams).
pub use parse_with_options;
/// Runtime parse configuration; pass to [`parse_with_options`] to skip expensive work.
pub use ParseOptions;
/// Core AST types used by parser, renderer, and intelligence modules.
pub use ;
/// Eagerly warm `parallel-render`'s thread pool and, for each given
/// language, its syntax highlighter — call at application startup with your
/// expected languages to move most of that one-time cost off the first
/// render. A no-op when `parallel-render` is not compiled in, so it's always
/// safe to call. See [`render::warm_render_thread_pool`] for details,
/// including which part of the cost this can and can't eliminate.
pub use warm_render_thread_pool;
/// Render a parsed [`Document`] into HTML using [`RenderOptions`].
pub use ;
/// UTF-8 sanitization API and related types.
pub use ;