Skip to main content

Crate panache_parser

Crate panache_parser 

Source
Expand description

panache-parser is a lossless Concrete Syntax Tree (CST) parser for Pandoc Markdown, Quarto, and R Markdown documents.

It preserves source structure and trivia (including markers and whitespace), making it suitable for editor tooling and formatting pipelines that require deterministic round-tripping.

§Quick start

use panache_parser::parse;

let tree = parse("# Heading\n\nParagraph text.", None);
println!("{:#?}", tree);

§Main entry points

Re-exports§

pub use pandoc_ast::to_pandoc_ast;
pub use pandoc_ast::to_pandoc_json;
pub use parser::inlines::refdef_map::RefdefMap;
pub use parser::inlines::refdef_map::collect_refdef_labels;
pub use parser::parse;
pub use parser::parse_with_refdefs;
pub use syntax::SyntaxNode;
pub use entities;

Modules§

pandoc_ast
CST → Pandoc-native AST text projector.
parser
Parser module for Pandoc/Quarto documents.
range_utils
syntax
Syntax tree types and AST node wrappers for Quarto/Pandoc documents.

Structs§

Extensions
Pandoc/Markdown extensions configuration. Each field represents a specific Pandoc extension. Extensions marked with a comment indicate implementation status.
ParserOptions

Enums§

Dialect
Parser dialect — the underlying inline tokenization rule set.
Flavor
The flavor of Markdown to parse and format. Each flavor has a different set of default extensions enabled.
PandocCompat