/**
* `tg-html` — transform arbitrary (LLM-emitted) HTML into Telegram-compatible
* `parse_mode=HTML` with opinionated, consistent spacing.
*
* Telegram's HTML subset has no headings, lists, or block layout — send it
* `
`/`` and the API rejects the whole message. This module accepts the
* HTML a model naturally writes and renders the structure typographically:
*
* h1 → … + blank line
* h2…h6 → … + blank line
* p/div/section/article/… → content + blank line
* ul/ol/li → `• ` bullets, blank line after the list
* br → newline
* blockquote → kept (newlines inside preserved), newline after
* b/i/u/s/code/pre/a/… → kept, attributes filtered to Telegram's allow-list
* spoiler / span.tg-spoiler →
* unknown letter-tags → dropped, content kept (hallucinated markup)
* stray < > → escaped, never eaten
*
* Zero dependencies, no DOM: a single-pass tokenizer over a small recursive
* renderer, safe everywhere (Workers included). Nothing is ever eaten:
* `x<5 and y>10` escapes rather than vanishing, and an unknown tag drops its
* markup while keeping its content.
*
* @example
* import { transform } from '@adriangalilea/utils/tg-html'
*
* transform('Title
')
* // 'Title\n\n• Point'
*/
/**
* Escape text or code content for Telegram HTML. The whole escaping
* contract for both this module and `tg-md`, which renders into the
* same dialect.
*/
export declare function escapeHtml(s: string): string;
/** Escape a value for a Telegram HTML attribute: text escaping plus quotes. */
export declare function escapeAttr(s: string): string;
/**
* Transform HTML into Telegram-compatible `parse_mode=HTML` with consistent
* spacing. Never throws; pathological input degrades to escaped plain text.
*/
export declare function transform(html: string): string;
//# sourceMappingURL=index.d.ts.map