Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

Make line numbers in diffs clickable anchors

未關閉
#152 0 則留言 1 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
3/5
預估耗時
1-2 天
新手友好度
48/100
Issue 類型
功能
描述清晰度
基本清楚
活躍度
停滯
技術堆疊
python
領域
frontend

研究方向

先定位 diff 檢視畫面以及渲染其行號的程式碼。檢查每個 hunk 的兩側是如何表示的,然後驗證行號是否顯示為帶有錨點的連結,這些錨點在多檔案 diff 中指向所要求的原始行或新行。

由索引模型根據 Issue 內容生成。

描述

enhancement

It would be nice if the diff view showed line numbers, and if they were also anchors, so you could share a link to a particular line of a diff.

This is possible on github, eg. the following link:

https://github.com/torvalds/linux/commit/bc976233a872c0f20f018fb1e89264a541584e25#diff-bfdbce36d815c6829b32b5eebc17923fL372

https://github.com/torvalds/linux/commit/bc976233a872c0f20f018fb1e89264a541584e25#diff-bfdbce36d815c6829b32b5eebc17923fL372

Takes you to line 372 of the left side (original) of a particular hunk of the multi-file diff.

And this link takes you to line 381 on the right side (new) of another hunk:

https://github.com/torvalds/linux/commit/bc976233a872c0f20f018fb1e89264a541584e25#diff-bfdbce36d815c6829b32b5eebc17923fR381

主要語言
Python
星號
317
分支
91
PR 合併指標
30 天內沒有已合併 PR

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

getpatchwork/patchwork 的其他 Issue

查看 getpatchwork/patchwork 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。