Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/node.js/40.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Node.js Slack是否支持标记格式?_Node.js_Slack_Slack Api - Fatal编程技术网

Node.js Slack是否支持标记格式?

Node.js Slack是否支持标记格式?,node.js,slack,slack-api,Node.js,Slack,Slack Api,我看到了这一点: 我的Node.js代码如下所示: const messageText = ` ## Jenkins build started ## Build status: ${b.state} #### Repo: ${b.repo_name || 'unknown repo'} Raw data: \`\`\` ${JSON.stringify(b)} \`\`\` `; // "type": "mrkdwn",

我看到了这一点:

我的Node.js代码如下所示:

  const messageText = `

   ## Jenkins build started

   ## Build status: ${b.state}

   #### Repo: ${b.repo_name || 'unknown repo'}

   Raw data:
   \`\`\`
   ${JSON.stringify(b)}
   \`\`\`

  `;

  // "type": "mrkdwn",


  return webClient.chat.postMessage({channel: id, text:  messageText, mrkdwn: true}).then(res => {
      console.log('Message sent: ', res.ts);
    });

很明显,slack正在接收请求,它的格式并不是我所期望的,有人知道如何在slack上很好地设置标记格式吗?

slack不支持标记,但有自己的标记语言

例如:

不可能产生标题


有关所有选项的完整说明,请参阅官方文档。

Slack不支持标记,但有自己的标记语言

例如:

不可能产生标题

有关所有选项的完整说明,请查阅官方文档

_italic_ will produce italicized text
*bold* will produce bold text
~strike~ will produce strikethrough text