Skip to content

Fix generated source image links#243

Open
sunilkumarvalmiki wants to merge 1 commit into
nashsu:mainfrom
sunilkumarvalmiki:fix/generated-source-image-links
Open

Fix generated source image links#243
sunilkumarvalmiki wants to merge 1 commit into
nashsu:mainfrom
sunilkumarvalmiki:fix/generated-source-image-links

Conversation

@sunilkumarvalmiki
Copy link
Copy Markdown
Contributor

Summary

  • Generate source-summary image links as ../media/... so they resolve from wiki/sources/*.md in external Markdown editors.
  • Normalize the new source-relative shape back to wiki/media/... for in-app preview loading.
  • Keep raw-source jump helpers compatible with both existing and new image link shapes.

Evidence

Before: #170 reports that generated source Markdown used media/... links, which do not resolve from files under wiki/sources/ when opened outside the app.
After: embedded-image sections in source summaries point to ../media/..., while the app still resolves both media/... and ../media/... to the same media files.

Tests

  • npm run test:mocks -- src/lib/extract-source-images.test.ts src/lib/markdown-image-resolver.test.ts src/lib/raw-source-resolver.test.ts
  • npm run test:mocks
  • npm run typecheck
  • npm run build
  • git diff --check

Closes #170

@nashsu
Copy link
Copy Markdown
Owner

nashsu commented May 24, 2026

please fix the conflicts, thx

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.

raw 导入pdf后,ingest后,wiki/sources/ 中生成的文件中的图片链接有问题

2 participants