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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
//! # docs-pipeline
//!
//! Markdown rendering and syntax highlighting pipeline for documentation
//! sites, extracted from the Tachyon knowledge base renderer.
//!
//! ## Modules
//!
//! - [`markdown`] — markdown → HTML/plain-text/AST rendering with GFM,
//! wikilinks, admonitions, embeds, block references, TOC extraction, and
//! ammonia-based sanitization.
//! - [`syntax`] — tree-sitter based syntax highlighting with per-language
//! cargo features (`lang-rust`, `lang-python`, …), themeable CSS output,
//! and rendered-HTML code block highlighting.
//! - [`latex`] — KaTeX equation rendering with `$`/`$$` placeholder handling
//! that skips `<pre>`/`<code>` content.
//! - [`embeds`] — whitelisted rich-media embed rendering (YouTube, Figma,
//! Gist, CodePen, tweets) as sandboxed iframes.
//! - [`sanitize`] — standalone HTML sanitization.
//! - [`types`] — render options, output formats, results, metadata, themes,
//! and supported languages.
//! - [`error`] — the pipeline error type.
//!
//! ## Example
//!
//! ```
//! use docs_pipeline::{render_markdown, extract_toc};
//!
//! let md = "# Getting Started\n\nSome **bold** text.";
//! let html = render_markdown(md);
//! assert!(html.contains("<strong>bold</strong>"));
//!
//! let toc = extract_toc(md);
//! assert_eq!(toc.len(), 1);
//! assert_eq!(toc[0].text, "Getting Started");
//! ```
//!
//! ## Syntax highlighting example
//!
//! ```
//! use docs_pipeline::syntax::SyntaxHighlighter;
//!
//! let hl = SyntaxHighlighter::new();
//! assert!(hl.is_language_supported("rust"));
//! let html = hl.highlight_or_fallback("fn main() {}", "rust");
//! assert!(html.contains("syntax-highlight"));
//! ```
// Re-export commonly used items at the crate root.
pub use ;
pub use ;
pub use ;
pub use ;
pub use sanitize_html;
pub use ;
pub use ;