You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

GitHub Action Summary表格内链接无法渲染,求解决方法

解决GitHub Action Summary表格内链接无法渲染的问题

在使用@actions/summary的addTable方法时,直接传入Markdown格式的链接字符串会被当作纯文本解析,导致显示原始语法。要实现链接的正常渲染,需要将表格单元格的内容定义为包含markdown: true属性的对象,明确告知解析器要处理Markdown语法。

修改后的代码如下:

summary
  .addHeading("Links", 2)
  .addTable([
    [{ data: 'Site', header: true }, { data: 'Url', header: true }],
    ["Google", { data: '[google.com](https://google.com)', markdown: true }]
  ])
.write();

这样设置后,URL列的内容会被正确渲染为可点击的链接,而不是显示原始的Markdown代码。

内容的提问来源于stack exchange,提问作者Jallrich

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.02 09:42:02