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
//! Markdown parsing and frontmatter extraction utilities.
//!
//! This module provides generic utilities for parsing markdown content:
//!
//! - [`frontmatter`]: YAML frontmatter extraction
//! - [`parser`]: Markdown structure parsing (headings, paragraphs)
//! - [`helpers`]: Content extraction helpers (lists, sections)
//!
//! # Design Philosophy
//!
//! These utilities return generic types (`yaml_serde::Value`, `String`) rather
//! than domain-specific structs. Domain crates (music-theory, math, etc.)
//! define their own metadata types and use these utilities to extract raw data.
//!
//! # Example
//!
//! ```rust
//! use fabryk_content::markdown::{extract_frontmatter, FrontmatterResult};
//! use serde::Deserialize;
//!
//! // Domain-specific frontmatter struct
//! #[derive(Deserialize)]
//! struct MyFrontmatter {
//! title: String,
//! category: Option<String>,
//! }
//!
//! let content = "---\ntitle: Hello\ncategory: test\n---\n\nBody text";
//! let result = extract_frontmatter(content).unwrap();
//!
//! // Deserialize into domain-specific type
//! let fm: Option<MyFrontmatter> = result.deserialize().unwrap();
//! assert_eq!(fm.unwrap().title, "Hello");
//! ```
// Re-export key types and functions
pub use ;
pub use ;
pub use ;