Skip to content

fix(web): resolve parsed Windows file links - #1

Draft
carlosesl1 wants to merge 1 commit into
peculiarnewbie:fix/windows-markdown-file-linksfrom
carlosesl1:agent/fix-angle-windows-markdown-links
Draft

carlosesl1 wants to merge 1 commit into
peculiarnewbie:fix/windows-markdown-file-linksfrom
carlosesl1:agent/fix-angle-windows-markdown-links

Conversation

@carlosesl1

Copy link
Copy Markdown

Problem

The upstream PR preserves direct Windows drive links through sanitization, but ChatMarkdown still classifies file links from a raw-text regex before rendering. Valid Markdown destinations such as <C:/Users/Carlos/My Project/docs/Plan (final).md> are parsed by React Markdown but missed by that regex, so the precomputed metadata lookup is empty and the rendered link falls through to the ordinary external-anchor path.

Fix

  • Resolve the normalized, parsed href directly when the precomputed raw-Markdown lookup misses.
  • Keep the precomputed map as the fast path.
  • Add regression coverage for angle-bracketed Windows paths containing spaces and balanced parentheses.

This is intentionally a small follow-up to pingdotgg#6237 and covers the reproduction documented in pingdotgg#5158.

Verification

  • vp test run src/markdown-links.test.ts src/markdown-links-rendering.test.tsx --project unit — 43 tests passed
  • pnpm --filter @t3tools/web typecheck
  • Targeted vp lint and vp fmt --check for the four changed files

No visual styling changes; this only routes already-rendered file links through the existing file-link behavior.

Implemented with GPT-5.6 Sol in T3 Code via the Codex harness.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant