发现于 #3622 的实现过程(读 judgeHref() 确认站内绝对 URL 的处理顺序时)。观察类,今天没有任何用户或 CI 会碰到它;不在 #3622 完成范围内,按围栏未顺手改。
事实
scripts/check-doc-links.mjs 的 judgeHref() 里,解释「站内绝对 URL 是穿了 origin 外衣的内部路由」的那段注释出现了两遍,一字不差。origin/main(0e4ea07,即 PR #3629)上的行号 689–696:
// A URL on this site is an internal route wearing an origin. Strip the origin
// and judge what is left with the same `routeExists()` every absolute href
// goes through — so `/docs` strictness and the `apps/site` route table apply
// here too, on every surface, `content/docs` included.
// A URL on this site is an internal route wearing an origin. Strip the origin
// and judge what is left with the same `routeExists()` every absolute href
// goes through — so `/docs` strictness and the `apps/site` route table apply
// here too, on every surface, `content/docs` included.
const siteRoute = siteAbsoluteRoute(href);
纯注释,零行为影响,无测试相关。看上去是 #3629 合并时的一次重复粘贴。
修复
删掉重复的四行即可。这个文件的头注释是它最重要的资产(每一次扩面都在里面留了论证),重复段落会让下一个读者以为自己看漏了什么,所以值得清掉——但它既不是缺陷也不阻塞任何人,由分诊决定要不要单独排期,或者搭下一次动这个文件的车。
发现于 #3622 的实现过程(读
judgeHref()确认站内绝对 URL 的处理顺序时)。观察类,今天没有任何用户或 CI 会碰到它;不在 #3622 完成范围内,按围栏未顺手改。事实
scripts/check-doc-links.mjs的judgeHref()里,解释「站内绝对 URL 是穿了 origin 外衣的内部路由」的那段注释出现了两遍,一字不差。origin/main(0e4ea07,即 PR #3629)上的行号 689–696:纯注释,零行为影响,无测试相关。看上去是 #3629 合并时的一次重复粘贴。
修复
删掉重复的四行即可。这个文件的头注释是它最重要的资产(每一次扩面都在里面留了论证),重复段落会让下一个读者以为自己看漏了什么,所以值得清掉——但它既不是缺陷也不阻塞任何人,由分诊决定要不要单独排期,或者搭下一次动这个文件的车。