markdown_ppp/lib.rs
1//! # markdown-ppp
2//!
3//! Feature-rich Markdown Parsing and Pretty-Printing library.
4//!
5//! This crate provides comprehensive support for parsing CommonMark + GitHub Flavored Markdown (GFM)
6//! and converting it to various output formats including Markdown, HTML, and LaTeX.
7
8/// Fully-typed Abstract Syntax Tree (AST) for CommonMark + GitHub Flavored Markdown.
9///
10/// The AST module provides a generic AST structure. See [`ast::generic`] for more details.
11pub mod ast;
12
13/// Specialized AST types for common use cases like element IDs and source tracking.
14///
15/// This module provides pre-defined specialized versions of the generic AST
16/// for scenarios like element identification and source location tracking.
17///
18/// # Available modules
19///
20/// - `element_id` - Element ID support and related functionality
21/// - `source_info` - Source location tracking
22/// - `element_data` - Combined element ID and source information
23/// - `type_aliases` - Convenient type aliases for specialized AST types
24/// - `utilities` - Helper functions and utilities
25#[cfg(feature = "ast-specialized")]
26pub mod ast_specialized;
27
28/// Markdown parser for CommonMark + GFM.
29///
30/// Parse Markdown text into an AST using [`parse_markdown`](parser::parse_markdown).
31#[cfg(feature = "parser")]
32pub mod parser;
33
34/// Markdown pretty-printer for formatting AST back to Markdown.
35///
36/// Render AST to Markdown using [`render_markdown`](printer::render_markdown).
37#[cfg(feature = "printer")]
38pub mod printer;
39
40/// HTML renderer for converting Markdown AST to HTML.
41///
42/// Render AST to HTML using [`render_html`](html_printer::render_html).
43#[cfg(feature = "html-printer")]
44pub mod html_printer;
45
46/// LaTeX renderer for converting Markdown AST to LaTeX.
47///
48/// Render AST to LaTeX using [`render_latex`](latex_printer::render_latex).
49#[cfg(feature = "latex-printer")]
50pub mod latex_printer;
51
52/// AST transformation utilities for manipulating parsed Markdown.
53#[cfg(feature = "ast-transform")]
54pub mod ast_transform;