/** * Escape utilities for Telegram message formatting * * Single source of truth for all escape functions. * Both HTML and MarkdownV2 escape functions live here. */ /** * Escape HTML special characters for Telegram HTML parse mode * Handles all special characters that could break HTML parsing * * @param text - Raw text to escape * @returns HTML-escaped text safe for Telegram */ export declare function escapeHTML(text: string): string; /** * Escape special characters for Telegram MarkdownV2 parse mode * All 18 special characters must be escaped with backslash in normal text * * Characters: _ * [ ] ( ) ~ ` > # + - = | { } . ! * * @param text - Raw text to escape * @returns MarkdownV2-escaped text */ export declare function escapeMarkdownV2(text: string): string; /** * Escape characters inside MarkdownV2 code/pre blocks * Only backtick and backslash need escaping inside code * * @param text - Text inside code block * @returns Escaped text for code context */ export declare function escapeMarkdownV2InCode(text: string): string; /** * Escape characters inside MarkdownV2 inline link URLs * Only closing parenthesis and backslash need escaping inside URLs * * @param text - URL text * @returns Escaped text for URL context */ export declare function escapeMarkdownV2InUrl(text: string): string;