Kotlin helper that strips Markdown syntax to plain text for WeChat messages.
// Source: https://github.com/agents-io/PokeClaw | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
// Copyright 2026 PokeClaw (agents.io). All rights reserved.
// Licensed under the Apache License, Version 2.0.
package io.agents.pokeclaw.channel.wechat
/**
* Markdown to plain text conversion.
* Strictly mirrors the official @tencent-weixin/openclaw-weixin@1.0.2 src/messaging/send.ts markdownToPlainText()
*/
object WeChatMarkdown {
/**
* Convert Markdown-formatted text to plain text, preserving line breaks and removing Markdown syntax.
*/
fun markdownToPlainText(text: String): String {
var result = text
// Code blocks: strip fences, keep code
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key