The best way to control Claude Code, Codex and more from any computer or phone
fix(mobile): inline-code file paths with non-ASCII names become file pills (#35552)
Julius Marminge committed
Nov 12, 2026 at 11:28 UTC
78ee8a156dbaafa8c7f931f6e34c1211d795be31
2 files changed
+4
-1
apps/mobile/src/lib/enrichedLinkPresentation.ts
+1
-1
@@ -92,7 +92,7 @@ export function enrichedLinkVariantPattern(url: string) {
92
}
93
94
export const ENRICHED_INLINE_FILE_LINK_REGEX =
95
- /^(?!\S*:\/\/)(?:(?:\.{1,2}[\\/]|~[\\/]|\/(?:Users|home|tmp|var|etc|opt|mnt|Volumes|private|root|usr|bin|sbin|lib|lib64|srv|dev|proc|sys|run|boot|media|workspace|workspaces)\/|[A-Za-z]:[\\/])[^\s`]+|(?:[A-Za-z0-9._-]+[\\/])+[A-Za-z0-9._-]+\.[A-Za-z0-9_-]+(?::\d+(?::\d+|-\d+)?)?|[A-Za-z0-9._-]+\.[A-Za-z0-9_-]+:\d+(?::\d+|-\d+)?)$/;
95
+ /^(?!\S*:\/\/)(?:(?:\.{1,2}[\\/]|~[\\/]|\/(?:Users|home|tmp|var|etc|opt|mnt|Volumes|private|root|usr|bin|sbin|lib|lib64|srv|dev|proc|sys|run|boot|media|workspace|workspaces)\/|[A-Za-z]:[\\/])[^\s`]+|(?:[\p{L}\p{M}\p{N}._-]+[\\/])+[\p{L}\p{M}\p{N}._-]+\.[A-Za-z0-9_-]+(?::\d+(?::\d+|-\d+)?)?|[\p{L}\p{M}\p{N}._-]+\.[A-Za-z0-9_-]+:\d+(?::\d+|-\d+)?)$/u;
96
97
export function enrichedSkillLinkRegex(skills?: ReadonlyArray<SelectableMarkdownSkill>) {
98
const names = [...new Set(skills?.map((skill) => skill.name) ?? [])].filter(Boolean);
apps/mobile/src/lib/markdownInlineFileLinks.test.ts
+3
@@ -93,6 +93,9 @@ describe("inline code that names a file", () => {
93
expect(rewrite("See `src/math.ts:2` and `./README.md`.")).toBe(
94
"See [src/math.ts:2](<src/math.ts:2>) and [./README.md](<./README.md>).",
95
);
96
+ for (const path of ["src/數學.ts:2", "數學/math.ts:2", "數學.ts:2", "src/數學.ts:2-4"]) {
97
+ expect(rewrite(`See \`${path}\`.`), path).toBe(`See [${path}](<${path}>).`);
98
+ }
99
});
100
101
it("keeps commands, identifiers and URLs as code", () => {