/** * @fileoverview Markdown parser with frontmatter support and syntax highlighting * @module parser/MarkdownParser */ import type { FrontMatter, HighlightTheme, ParsedDocument, TocEntry } from '../types/index.js'; /** * Parser for Markdown documents with frontmatter and syntax highlighting support * * @example * ```typescript * const parser = new MarkdownParser(); * const document = parser.parseFile('/path/to/file.md'); * const html = parser.render(document.content); * ``` */ export declare class MarkdownParser { /** Custom renderer instance */ private renderer; /** Marked instance configured with custom renderer */ private markedInstance; /** * Create a new MarkdownParser instance */ constructor(); /** * Parse frontmatter from Markdown content * @param content - Raw Markdown content with potential frontmatter * @returns Parsed frontmatter and content */ parseFrontMatter(content: string): { frontMatter: FrontMatter; content: string; }; /** * Parse a Markdown string into a parsed document * @param markdownContent - Raw Markdown content * @param filePath - Source file path for reference * @returns Parsed document object */ parse(markdownContent: string, filePath?: string): ParsedDocument; /** * Render Markdown content to HTML * @param markdownContent - Markdown content to render * @returns Rendered HTML string */ render(markdownContent: string): string; /** * Get TOC entries from the last rendered document * @returns Array of TOC entries */ getTocEntries(): TocEntry[]; /** * Generate HTML for table of contents * @param entries - TOC entries to render * @param maxLevel - Maximum heading level to include (default: 3) * @returns HTML string for the TOC */ generateTocHtml(entries: TocEntry[], maxLevel?: number): string; /** * Get the default theme based on frontmatter or fallback * @param frontMatter - Document frontmatter * @param defaultTheme - Default theme to use if not specified * @returns Theme to use for rendering */ getTheme(frontMatter: FrontMatter, defaultTheme?: HighlightTheme): HighlightTheme; } //# sourceMappingURL=MarkdownParser.d.ts.map