LemonChannels.Adapters.WhatsApp.Formatter (lemon_channels v0.1.0)

View Source

Converts Markdown to WhatsApp formatting.

WhatsApp uses:

  • bold (not bold)
  • italic
  • ~strikethrough~ (not strike)
  • code blocks (native)
  • inline code (native)

Summary

Functions

Converts markdown text to WhatsApp-compatible formatting.

Removes unsupported markdown: links become plain text, images become [image: url].

Functions

format(text)

Converts markdown text to WhatsApp-compatible formatting.

strip_unsupported(text)

Removes unsupported markdown: links become plain text, images become [image: url].