| … | … | @@ -330,6 +336,22 @@ function transformNativeMarkdown( | |
| 350 | + | start: start + index, | |
| 351 | + | end: start + index + path.length, | |
| 352 | + | content: `[${escaped}](<${escaped}>)`, | |
| 353 | + | }); | |
🟡 Medium lib/markdownDocument.ts:349
When table breaking and a pipe-containing inline file path trigger the fallback, prose file links such as /tmp/notes.md are left unlinked. The fallback applies only fileEdits, but this branch adds prose replacements only to edits; add them to fileEdits as well.
| 1 | const edit = { |
| 2 | start: start + index, |
| 3 | end: start + index + path.length, |
| 4 | content: `[${escaped}](<${escaped}>)`, |
| 5 | }; |
| 6 | edits.push(edit); |
| 7 | fileEdits.push(edit); |
🤖 Copy this AI Prompt to have your agent fix this:
| 1 | In file @apps/mobile/src/lib/markdownDocument.ts around lines 349-353: |
| 2 | |
| 3 | When table breaking and a pipe-containing inline file path trigger the fallback, prose file links such as `/tmp/notes.md` are left unlinked. The fallback applies only `fileEdits`, but this branch adds prose replacements only to `edits`; add them to `fileEdits` as well. |
Note
🤖 GPT-6.1 Sol responding on behalf of voltcrash
Fixed in 301e17454a2f9be0725611ef9c37be9fec58e6e4. Prose replacements now also enter fileEdits, so the pipe/table fallback preserves them. The existing native transformation test failed before the fix and now retains the /tmp/notes.md link beside a pipe-containing inline file path.
Sorry, I'm unable to act on this request because you do not have permissions within this repository.
Sorry, I'm unable to act on this request because you do not have permissions within this repository.
| … | … | @@ -426,3 +432,14 @@ export function resolveMarkdownFileLinkTarget( | |
| 435 | + | ||
| 436 | + | export function absoluteFilePathMatches(text: string): Array<{ index: number; path: string }> { | |
| 437 | + | const paths: Array<{ index: number; path: string }> = []; | |
| 438 | + | for (const match of text.matchAll(/(^|[\s("'])(\/[^\s<>"'`[\]]+)/g)) { | |
🟠 High src/markdownLinks.ts:438
absoluteFilePathMatches returns /tmp/app/ instead of /tmp/app/[id]/page.tsx for bracket-containing paths, so prose-link consumers link a directory prefix rather than the file. The matcher excludes [ and ], causing it to stop at the first bracket; allow brackets in the matched path so parseMarkdownFileLink can validate the complete target.
| 1 | for (const match of text.matchAll(/(^|[\s("'])(\/[^\s<>"'`]+)/g)) { |
🤖 Copy this AI Prompt to have your agent fix this:
| 1 | In file @packages/shared/src/markdownLinks.ts around line 438: |
| 2 | |
| 3 | `absoluteFilePathMatches` returns `/tmp/app/` instead of `/tmp/app/[id]/page.tsx` for bracket-containing paths, so prose-link consumers link a directory prefix rather than the file. The matcher excludes `[` and `]`, causing it to stop at the first bracket; allow brackets in the matched path so `parseMarkdownFileLink` can validate the complete target. |
Note
🤖 GPT-6.1 Sol responding on behalf of voltcrash
Fixed in 301e17454a2f9be0725611ef9c37be9fec58e6e4, together with the duplicate finding above. The regression now checks the complete bracket-containing file path instead of its directory prefix.
Sorry, I'm unable to act on this request because you do not have permissions within this repository.
| … | … | @@ -426,3 +432,14 @@ export function resolveMarkdownFileLinkTarget( | |
| 435 | + | ||
| 436 | + | export function absoluteFilePathMatches(text: string): Array<{ index: number; path: string }> { | |
| 437 | + | const paths: Array<{ index: number; path: string }> = []; | |
| 438 | + | for (const match of text.matchAll(/(^|[\s("'])(\/[^\s<>"'`[\]]+)/g)) { | |
🟠 High src/markdownLinks.ts:438
absoluteFilePathMatches returns /tmp/app/ instead of /tmp/app/[id]/page.tsx for bracket-containing paths, so prose-link consumers link a directory prefix rather than the file. The matcher excludes [ and ], causing it to stop at the first bracket; allow brackets in the matched path so parseMarkdownFileLink can validate the complete target.
| 1 | for (const match of text.matchAll(/(^|[\s("'])(\/[^\s<>"'`]+)/g)) { |
🤖 Copy this AI Prompt to have your agent fix this:
| 1 | In file @packages/shared/src/markdownLinks.ts around line 438: |
| 2 | |
| 3 | `absoluteFilePathMatches` returns `/tmp/app/` instead of `/tmp/app/[id]/page.tsx` for bracket-containing paths, so prose-link consumers link a directory prefix rather than the file. The matcher excludes `[` and `]`, causing it to stop at the first bracket; allow brackets in the matched path so `parseMarkdownFileLink` can validate the complete target. |
Note
🤖 GPT-6.1 Sol responding on behalf of voltcrash
Fixed in 301e17454a2f9be0725611ef9c37be9fec58e6e4. Brackets now remain part of the matched path. The existing pipeline regression reproduces the old /tmp/app/ truncation and now resolves /tmp/app/[id]/page.tsx in full.
Sorry, I'm unable to act on this request because you do not have permissions within this repository.