scrybe_render/lib.rs
1// SPDX-License-Identifier: Apache-2.0
2// Copyright 2026 Shawn Hartsock and contributors
3
4//! Scrybe render — Markdown-to-HTML pipeline.
5//!
6//! - Markdown parsing via `pulldown-cmark`
7//! - Syntax highlighting via `syntect`
8//! - Math placeholder extraction/injection (KaTeX-ready)
9//! - Mermaid wrapper injection (Mermaid.js-ready)
10//! - Theme CSS injection
11
12pub mod html;
13pub mod math;
14pub mod mermaid;
15pub mod theme;
16
17pub use html::render_html;
18pub use math::{extract_math, MathPlaceholder};
19pub use mermaid::inject_mermaid_wrappers;
20pub use theme::Theme;
21
22/// The rendered output of a document.
23#[derive(Debug, Clone)]
24pub struct RenderOutput {
25 /// Full HTML fragment including `<style>` from the chosen theme.
26 pub html: String,
27 /// Body content only — no CSS wrapper.
28 pub body_html: String,
29}