/**
* Content Parser — HTML → Markdown article structure
*
* Handles:
* - HTML cleaning (remove scripts, fix relative URLs)
* - HTML → Markdown conversion (Turndown)
* - Article structure extraction (title, breadcrumb, related articles)
* - Search snippet cleaning
*/
import * as cheerio from 'cheerio';
/**
* Clean HTML content: remove unwanted elements, fix relative URLs.
*/
export declare function cleanHtml($: cheerio.CheerioAPI): void;
export interface ParsedArticleContent {
title: string;
content: string;
breadcrumb: string[];
relatedArticles: {
title: string;
url: string;
}[];
}
/**
* Parse HTML into article structure (title, markdown content, breadcrumb).
*/
export declare function parseArticle(html: string, displayUrl: string, options?: {
includeRelated?: boolean;
}): ParsedArticleContent;
/**
* Clean an HTML search snippet: strip tags, clean breadcrumb prefixes.
*/
export declare function cleanSnippet(snippet: string, title: string, product: string | null): string;
/**
* Convert raw HTML to Markdown using the shared Turndown instance.
*/
export declare function htmlToMarkdown(html: string): string;
//# sourceMappingURL=content-parser.d.ts.map