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
WhatsApp adapter adds visible backslashes before literal tildes #908
In @chat-adapter/whatsapp@4.39.0, outgoing Markdown containing a literal tilde gets an extra backslash. For example, (~80 % easy) is delivered as (\~80 % easy), with the backslash visible in WhatsApp.
The original model output contains no backslash. This reproduces directly in the adapter’s formatter without an LLM or network request.
Steps to Reproduce
Use @chat-adapter/whatsapp@4.39.0 with chat@4.37.0 (our project pins chat via an override).
Run the minimal code sample below with Bun.
Observe that the formatter returns (\~80 % easy) instead of (~80 % easy).
Sending { markdown: "(~80 % easy)" } uses the same converter and includes the unwanted backslash in the outgoing message.
Expected Behavior
The formatter should return (~80 % easy) unchanged. Literal text should arrive without serializer-added Markdown escapes, while supported formatting still converts to WhatsApp syntax. Intentional backslashes and code content should remain intact.
Actual Behavior
The formatter returns (\~80 % easy). The added backslash remains visible in the delivered WhatsApp message.
This also affects multiple tildes: ~45 min, Pace ~6:29/km becomes \~45 min, Pace \~6:29/km.
Hi! I'd like to pick this up — could you assign me?
Plan: prevent remark-stringify from escaping literal tildes in non-strikethrough text (likely a custom serializer option or post-serialization handling), keep intentional escapes and code blocks intact, and add regression tests for single/multiple tildes plus code content.
Activity
v01dst commentedon Sep 6, 2026
Hi! I'd like to pick this up — could you assign me?
Plan: prevent remark-stringify from escaping literal tildes in non-strikethrough text (likely a custom serializer option or post-serialization handling), keep intentional escapes and code blocks intact, and add regression tests for single/multiple tildes plus code content.
luksch42 commentedon Sep 6, 2026
Pr is open :)
fix(whatsapp): send literal text without Markdown escapes
fix(whatsapp): combine sender number and literal formatting fixes (ve…