Telegram-safe text rendering and splitting helpers.
Telegram accepts a small HTML subset and limits messages to 4096 visible characters after entity parsing. These helpers prefer safety over clever Markdown fidelity: raw text is escaped, a small Markdown-like subset is mapped to Telegram HTML, and long messages are split on paragraph/line/word boundaries before sending.
Summary
Functions
Converts and splits text into Telegram-safe HTML chunks.
Limits a string with an ellipsis, preserving valid grapheme boundaries.
Splits text into chunks that fit Telegram's visible text limit.
Converts plain/Markdown-like text to Telegram-safe HTML.
Functions
Converts and splits text into Telegram-safe HTML chunks.
@spec limit(String.t(), pos_integer()) :: String.t()
Limits a string with an ellipsis, preserving valid grapheme boundaries.
Splits text into chunks that fit Telegram's visible text limit.
Converts plain/Markdown-like text to Telegram-safe HTML.