[Bug]: Relative file links with non-ASCII paths don't open

已关闭 适合新手
#16,096 3 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@sybeeria 已经在做这个了。

开始于 2026年10月18日。

  • #16071 来自 @JDeffner —— 已关闭,未合并
  • #21176 来自 @sybeeria —— 未关闭
  • #24418 来自 @juliusmarminge —— 未关闭

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
75/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
typescript
领域
frontend

调研方向

从packages/client-runtime/src/markdownLinks.ts开始,检查parseMarkdownFileLink,然后使用包含非 ASCII 字符的裸相对路径重现该问题。完成标准是:点击该链接时,无需./前缀即可打开本地文件;检查 client runtime 中是否已有相关测试。

由索引模型根据 Issue 内容生成。

描述

bug via-triage

I was studying for a midterm while abroad and asked chat for a past exam. It linked a real file:

Summer 2026/.../pastexam/線性代數/2025_midterm_exam1_易志偉_1222.pdf

Clicking it didn't open the PDF.

Steps

  1. In chat, use a bare relative link whose path contains non-ASCII characters, with no ./ prefix.
  2. Click it.

Expected
The local file opens.

Actual
parseMarkdownFileLink only accepts bare relative paths matching [A-Za-z0-9._-] (packages/client-runtime/src/markdownLinks.ts on main @ 1604ccc). The Chinese characters fail that check, so the link is treated as a web link. Percent-encoding doesn't help, because the path is decoded before the check.

Workaround
Prefix the path with ./.

macOS, T3 Code.

主要语言
TypeScript
星标
24.8k
派生
6.4k
平均合并
13 小时 48 分钟
30 天内合并 PR
208

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

pingdotgg/t3code 的其他 Issue

查看 pingdotgg/t3code 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。