Markdown 不在 Messenger 中呈现

Markdown not rendering in messenger

我正在编写一些简单的 markdown,它在测试中显示正确 window 但是当它在 Facebook Messenger 中呈现时没有呈现。

这是在 Messenger 中显示的纯文本,而不是标题文本

# This Is The Heading # 

这是粗体文本在 Messenger 中显示的纯文本

*Bold Stuff*    

这是我正在使用的代码。正如我所说,它在测试 window.

中运行良好
    StringBuilder sb = new StringBuilder();
    sb.AppendLine("# This Is The Heading  \n\n");
    sb.AppendLine("Some text    \n\n");
    sb.AppendLine("**Bold Stuff**    \n\n");
    sb.AppendLine("more text    \n\n");

    IMessageActivity reply = context.MakeMessage();
    reply.Text = sb.ToString();
    context.PostAsync(reply);

来自 craigjensen 的回答:

Messenger doesn't support markdown so we strip it and send the plain text. If/when Facebook starts supporting markdown we'll make the necessary updates to fully support it.

此处:https://github.com/Microsoft/BotBuilder/issues/2033


Channel Inspector 是一个有用的工具,用于查看不同功能在不同通道上的呈现方式:https://docs.botframework.com/en-us/channel-inspector/channels/Facebook?f=Markdown&e=example1