评论答案的代表限制是愚蠢的......如果人们甚至无法与论坛互动,他们应该如何获得声誉。
也很抱歉破坏了旧帖子,但这是迄今为止我发现的最接近我的问题的帖子。
无论如何,mrkdwn_in 属性对于附件中的星号* 问题没有多大帮助。
"attachments": [
{
"fallback": "Required plain-text summary of the attachment.",
"color": "#000000",
"mrkdwn_in": ["fields", "text"],
"fields": [
{
"title": "XXXXXX",
"value": "*PVC* avg: xxs, max: xxxs, avg-diff: xx% \n*EPH* avg: xxs, max: xxxs, avg-diff: xx%",
"short": true
},
{
"title": "XXXXXX",
"value": "*PVC* avg: xxs, max: xxxs, avg-diff: xx% \n*EPH* avg: xxs, max: xxxs, avg-diff: xx%",
"short": true
}
]
},
.
.
.
在avg-diff: 之后,我将插入一个字符串" *↑* " 并将其与消息的其余部分连接起来。
出于某种原因,向下箭头 " _↓_ " 被正确翻译为 HTML。只是 bold 坏了。
因此,消息仍包含 ASCII 箭头周围的 *,但其余文本(如 *PVC*)被正确翻译成 HTML
Screenshot of the attachment from Slack