markdown url 中的 hypen breaking URL - webchat botframework

hypen breaking URL in markdown url - webchat botframework

我有一个 url,其中包含一个连字符。这个 hypen 打破了 url 的显示方式,并没有让 URL 以 markdown 格式正确显示,如下所示

HTML

Please  <a href="https://abcd.service-now.com" target="_blank"> click here </a> to view RITM details on Service Now.

降价

Please [click here](https://abcd.service- now.com) to view RITM details on Service Now.

我通常从常量生成 link 并将其转换为 HTML 锚标记,然后使用 html2text 将其转换为 MarkDown。我该怎么做才能不让 URL 拆分,以便它在 markdown 中正确显示。 markdown 用于在 Bot Framework Web Chat 控件上显示

您可以尝试在python中直接在botbuilder中发送markdown格式字符串。正如 Channel Inspector 中提到的,网络聊天也支持它。

我用 hypen link 进行了测试,它在我这边运行良好。

def __create_reply_activity(request_activity):
        return Activity(
            type=ActivityTypes.message,
            channel_id=request_activity.channel_id,
            conversation=request_activity.conversation,
            recipient=request_activity.from_property,
            from_property=request_activity.recipient,
            text='[Click here](https://bing-well.com)',
            service_url=request_activity.service_url)