【问题标题】:GitHub code permalink does not paste linesGitHub 代码永久链接不粘贴行
【发布时间】:2021-09-27 21:40:11
【问题描述】:

我正在尝试在 GitHub 问题中评论以下几行:

https://github.com/AMP-SCZ/dpanonymize/blob/49282b5c67ca1f88e7a651bc724e639b97e819d9/dpanonymize/__init__.py#L63-L69

但是,在我将其粘贴到评论框中后,它并没有像下面那样显示行:

https://github.com/pnlbwh/luigi-pnlpipe/blob/87603cf59eaa09dc64bed447496841bfcb11e3e8/workflows/_glob.py#L4-L14

有人知道前者的问题吗?

【问题讨论】:

  • 我意识到永久链接仅在永久链接的存储库中转换为实际代码。是预期的吗?
  • 我投票结束这个问题,因为它属于网络应用程序
  • 我不确定 Web 应用程序和 GitHub 是如何以及什么混合的,但谢谢。

标签: github github-issues


【解决方案1】:

根据:

https://docs.github.com/en/github/writing-on-github/working-with-advanced-formatting/creating-a-permanent-link-to-a-code-snippet#linking-to-code

这种类型的永久链接将仅在其起源的存储库中呈现为代码 sn-p。在其他存储库中,永久链接代码 sn-p 将呈现为 URL。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2012-03-10
    • 1970-01-01
    • 2019-02-10
    • 1970-01-01
    • 1970-01-01
    • 2017-07-30
    • 2017-03-19
    • 1970-01-01
    相关资源
    最近更新 更多