hwpforge_smithy_md/lib.rs
1//! Markdown codec for HwpForge.
2//!
3//! This crate provides a bidirectional bridge between Markdown and the
4//! format-agnostic Core DOM:
5//!
6//! - Decode: Markdown + Template -> `Document<Draft>`
7//! - Encode (lossy): `Document<Validated>` -> readable GFM
8//! - Encode (lossless): `Document<Validated>` -> frontmatter + HTML-like markup
9//!
10//! # Architecture
11//!
12//! ```text
13//! foundation (indices, units)
14//! |
15//! v
16//! core (Document DOM)
17//! |
18//! v
19//! blueprint (Template, StyleRegistry)
20//! |
21//! v
22//! smithy-md (THIS CRATE)
23//! ```
24
25#![deny(missing_docs)]
26#![deny(unsafe_code)]
27#![deny(clippy::all)]
28
29mod decoder;
30mod encoder;
31pub mod error;
32pub mod frontmatter;
33mod mapper;
34
35pub use decoder::{MdDecoder, MdDocument};
36pub use encoder::MdEncoder;
37pub use error::{MdError, MdErrorCode, MdResult};
38pub use frontmatter::Frontmatter;