Summary
Rich-mode non-PDF images appear to ignore document-relative path resolution.
Why this looks wrong
src/render/image-render.ts resolves PDF targets relative to the current document before rendering them, but the non-PDF branch still passes the raw markdown target directly into <img src>.
That means a document like posts/math.md with  likely renders diagram.png relative to the app URL rather than posts/diagram.png.
Affected code
src/render/image-render.ts
src/lib/project-paths.ts
Impact
Rich mode can fail to render ordinary relative images from nested documents even though the project-path helpers already know how to resolve them.
Notes
This came from static audit, not a live UI repro. I did not find any file-to-webview URL bridge elsewhere in the repo that would make the raw path safe.
Related: #437
Summary
Rich-mode non-PDF images appear to ignore document-relative path resolution.
Why this looks wrong
src/render/image-render.tsresolves PDF targets relative to the current document before rendering them, but the non-PDF branch still passes the raw markdown target directly into<img src>.That means a document like
posts/math.mdwithlikely rendersdiagram.pngrelative to the app URL rather thanposts/diagram.png.Affected code
src/render/image-render.tssrc/lib/project-paths.tsImpact
Rich mode can fail to render ordinary relative images from nested documents even though the project-path helpers already know how to resolve them.
Notes
This came from static audit, not a live UI repro. I did not find any file-to-webview URL bridge elsewhere in the repo that would make the raw path safe.
Related: #437