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 element identification.
14///
15/// This module provides pre-defined specialized versions of the generic AST
16/// for element identification scenarios.
17///
18/// # Available modules
19///
20/// - `element_id` - Element ID support and related functionality
21/// - `type_aliases` - Convenient type aliases for specialized AST types
22/// - `utilities` - Helper functions and utilities
23#[cfg(feature = "ast-specialized")]
24pub mod ast_specialized;
25
26/// Markdown parser for CommonMark + GFM.
27///
28/// Parse Markdown text into an AST using [`parse_markdown`](parser::parse_markdown).
29#[cfg(feature = "parser")]
30pub mod parser;
31
32/// Markdown pretty-printer for formatting AST back to Markdown.
33///
34/// Render AST to Markdown using [`render_markdown`](printer::render_markdown).
35#[cfg(feature = "printer")]
36pub mod printer;
37
38/// HTML renderer for converting Markdown AST to HTML.
39///
40/// Render AST to HTML using [`render_html`](html_printer::render_html).
41#[cfg(feature = "html-printer")]
42pub mod html_printer;
43
44/// LaTeX renderer for converting Markdown AST to LaTeX.
45///
46/// Render AST to LaTeX using [`render_latex`](latex_printer::render_latex).
47#[cfg(feature = "latex-printer")]
48pub mod latex_printer;
49
50/// AST transformation utilities for manipulating parsed Markdown.
51#[cfg(feature = "ast-transform")]
52pub mod ast_transform;