/**
* HTML to Markdown conversion utilities
* 无依赖的 HTML 到 Markdown 转换工具
*/
export interface HtmlToMarkdownOptions {
/** 是否保留换行符 */
preserveLineBreaks?: boolean;
/** 是否保留 HTML 注释 */
preserveComments?: boolean;
/** 图片处理函数 */
imageHandler?: (src: string, alt: string) => string;
/** 链接处理函数 */
linkHandler?: (href: string, text: string) => string;
}
/**
* 将 HTML 字符串转换为 Markdown
* @param html HTML 字符串
* @param options 转换选项
* @returns Markdown 字符串
*/
export declare function htmlToMarkdown(html: string, options?: HtmlToMarkdownOptions): string;
/**
* 清理 HTML 字符串,移除不必要的空白和换行
*/
export declare function cleanHtml(html: string): string;
/**
* 检测字符串是否为 HTML
*/
export declare function isHtml(text: string): boolean;
/**
* 从 HTML 中提取纯文本
*/
export declare function extractTextFromHtml(html: string): string;
/**
* 批量转换 HTML 片段为 Markdown
*/
export declare function batchHtmlToMarkdown(htmlFragments: string[], options?: HtmlToMarkdownOptions): string[];