You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: File links whose path contains a space render as plain text #17742
I searched existing issues and found related reports, but this is a distinct case.
I included enough detail to reproduce or investigate the problem.
Area
apps/web
Steps to reproduce
Have an assistant reply contain a Markdown link to a local file whose path has a space in it, with a bare (unbracketed) destination, for example:
[message](path/to a spaced repo/file)
[AGENTS.md](C:/Users/me/Main Projects/repo/AGENTS.md)
Look at the rendered message and try to click the link.
Expected behavior
The link renders as a clickable file link and opens the file, the same as a path without spaces does.
Actual behavior
The whole thing renders as plain text ([message](path/to a spaced repo/file)), with nothing to click.
The same path without spaces works, and the angle-bracket form [message](<path/to a spaced repo/file>) also works.
Notes
Strictly, CommonMark doesn't allow spaces in a bare link destination, so the parser is following the spec. But agents write local paths this way all the time, and on Windows a space in the path is common (My Projects, Program Files, OneDrive folders), so every file link in a project like that comes out as plain text.
This looks like the same kind of render-time repair proposed in #11810 (closing a missing >): when [label](...) has a destination that contains spaces, has no ) inside it, and looks like a local file or folder path (relative, ./, /, or a Windows drive path), treat it as if it had been written [label](<...>). Web URLs and well-formed links would be left alone.
Activity