Expand description
§Markdown Parser Library
This library provides comprehensive Markdown parsing capabilities with HTML conversion. It uses Pest grammar for efficient parsing and supports various Markdown elements.
§Features
- Full Markdown syntax support (headings, paragraphs, links, images, formatting)
- Robust error handling with custom error types
- HTML output generation with proper escaping
- Command-line interface integration
§Example
use arinamcnulty_markdown_parser::{parse_markdown, str_to_html};
let markdown = "# Hello World\n\nThis is **bold** text.";
let html = str_to_html(markdown).unwrap();
println!("{}", html.join("\n"));Structs§
Enums§
- Markdown
Error - Custom error type for markdown parsing operations. Provides detailed error information for different failure scenarios.
- Rule
Functions§
- convert_
file_ to_ html - Convert markdown file to HTML file. Reads markdown from input path and writes HTML to output path.
- parse_
markdown - Main parsing function that processes markdown input. Returns parsed syntax tree or error if parsing fails.
- print_
html_ to_ console - Print HTML conversion result to console. Useful for command-line usage.
- str_
to_ html - Convert markdown string to vector of HTML strings. Each element represents one HTML line/tag.