You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 576a7a2
Browse filesBrowse the repository at this point in the historyBrowse files
| Matrix | HTML tags, including native tables | Automatic replies, direct sends, and media captions use the same formatter |
31
-
| Slack | mrkdwn tokens (`*bold*`, `_italic_`, `` `code` ``, code fences) | Links become `<url\|label>`; autolink disabled during parse to avoid double-linking |
32
-
| Telegram | HTML tags (`<b>`, `<i>`, `<s>`, `<code>`, `<pre><code>`, `<a href>`, `<tg-spoiler>`) | Also supports rich-message tables and headings (`<h1>`-`<h6>`) when `richMessages` is on |
33
-
| Signal | plain text + `text-style` ranges | Links render as `label (url)` when the label differs from the URL |
34
-
| Discord, WhatsApp, iMessage, Microsoft Teams, and other channels | plain text | No IR-based styling; Markdown table conversion still runs via `convertMarkdownTables`|
| Matrix | HTML tags, including native tables | Automatic replies, direct sends, and media captions use the same formatter |
34
+
| Signal | plain text + `text-style` ranges | Links render as `label (url)` when the label differs from the URL |
35
+
| Slack | mrkdwn tokens (`*bold*`, `_italic_`, `` `code` ``, code fences) | Links become `<url\|label>`; autolink disabled during parse to avoid double-linking |
36
+
| Telegram | HTML tags (`<b>`, `<i>`, `<s>`, `<code>`, `<pre><code>`, `<a href>`, `<tg-spoiler>`) | Also supports rich-message tables and headings (`<h1>`-`<h6>`) when `richMessages` is on |
37
+
| WhatsApp | WhatsApp style markers | Uses shared IR; styled chunks are measured after rendering |
35
38
36
39
## IR example
37
40
@@ -82,8 +85,9 @@ channels:
82
85
83
86
## Chunking rules
84
87
85
-
- Chunk limits come from channel adapters/config and apply to IR text, not
86
-
rendered output.
88
+
- Chunk limits come from channel adapters/config. `chunkMarkdownIR` limits IR
89
+
text; `renderMarkdownIRChunksWithinLimit` measures the final payload in the
90
+
transport's size unit, including escaping and rewritten links.
87
91
- Fenced code blocks are kept as one block with a trailing newline so
88
92
channels render the closing fence correctly.
89
93
- List and blockquote prefixes are part of the IR text, so chunking never
@@ -123,7 +127,8 @@ content is hidden or lost.
123
127
2. **Render** with `renderMarkdownWithMarkers(...)` and a style-marker map (or
124
128
custom style-range logic for transports like Signal).
125
129
3. **Chunk** with `chunkMarkdownIR(...)` or
126
-
`renderMarkdownIRChunksWithinLimit(...)`before rendering each chunk.
130
+
`renderMarkdownIRChunksWithinLimit(...)`. The latter returns the measured
131
+
`rendered`payload; use it directly instead of rendering the source again.
127
132
4. **Wire the adapter** to call the new chunker and renderer from the
128
133
outbound send path.
129
134
5. **Test** with format tests plus an outbound delivery test if the channel
0 commit comments