【问题标题】:Use emoji in Github markdown在 Github markdown 中使用表情符号
【发布时间】:2019-05-07 16:34:40
【问题描述】:

我正在使用他们的 API 生成 GitHub 评论,方法是在正文中传递如下标记

{
  "body": "Component \n | --------\n ![alt text](https://static.wooicon.com/files/a/rr/ow/cd50f73a0f0a769fcb10138d4f8eb98b/arrow-down.png)",
  "commit_id": "8574ac234999ffb5bbf93f66fac30a84342fe396",
  "path": "README.md",
  "position": 4
}

我现在希望使用来自this 页面的表情符号来代替上面的图片 URL。

我确实尝试过只传递表情符号,如下所示

"body": "Component \n | --------\n ![alt text](:small_red_triangle_down:)",

但是,这似乎不起作用,并且没有渲染图像。请告知我如何在 GitHub markdown 中使用表情符号。

【问题讨论】:

    标签: github markdown emoji


    【解决方案1】:

    考虑到 GitHub API 确实在 pull requestissues 中提到了表情符号,这可能仍然不受支持,但是...在 Accept 标头中使用 application/vnd.github.symmetra-preview+json 作为自定义 media type

    您可以尝试相同的媒体类型。但是,那是在beta last February (2018)

    OP Kevin Chau 加上in the comments

    我可以在代码中使用,只需将 ? 连接到降价,并使用标题 application/vnd.github.machine-man-preview+json

    【讨论】:

    • 感谢您回来。我可以在代码中使用,只需将 ? 连接到降价,并使用标头 application/vnd.github.machine-man-preview+json
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2018-06-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-08-23
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多