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
//! Define, validate, and render typed Markdown extensions.
//!
//! `mdforge` is built for applications that ask an LLM to produce Markdown-like
//! text but still need strong control over the structure. You define the
//! allowed block and inline extensions first, then run generated content through
//! `parse`, `validate`, `eval`, and a renderer.
//!
//! # Example
//!
//! ```rust
//! use mdforge::{ArgType, EvalContext, Forge};
//!
//! let forge = Forge::builder()
//! .block("card")
//! .arg("title", ArgType::String.required())
//! .body_markdown()
//! .register()
//! .inline("badge")
//! .arg("level", ArgType::Int.required())
//! .register()
//! .build();
//!
//! let input = ":::card title=hello\nBody {badge level=2}\n:::\n";
//! let doc = forge.parse(input).expect("parse");
//! forge.validate(&doc).expect("validate");
//! forge.eval(&doc, &EvalContext::default()).expect("eval");
//! assert!(forge.signature().contains("Block: card"));
//! ```
//!
//! See `docs/user_guide.md` in the repository for a longer walkthrough.
/// Abstract syntax tree types.
/// Structured diagnostics produced by parsing, validation, and evaluation.
/// Lightweight DOM-like output nodes.
/// Forge builders, pipeline methods, and renderer traits.
pub use ;
pub use ;
pub use ;
pub use ;