Skip to content

🐛 Omit local images from document exports#248

Open
baealex wants to merge 1 commit into
mainfrom
fix/omit-local-images-from-document-export
Open

🐛 Omit local images from document exports#248
baealex wants to merge 1 commit into
mainfrom
fix/omit-local-images-from-document-export

Conversation

@baealex

@baealex baealex commented Jul 9, 2026

Copy link
Copy Markdown
Owner

🎯 Goal

  • Prevent document-only Markdown exports and copied Markdown from exposing local image asset paths.
  • Remove noisy omitted-image comments from document-only exports.

🛠️ Core Changes

  • Omit local /assets/images/ Markdown images from document-only Markdown output.
  • Omit local image tags from document-only HTML output without inserting comments.
  • Apply the same local image filtering to the Copy Markdown action.
  • Harden Markdown image scanning for nested brackets, parenthesized URLs, angle URLs, and optional titles.

🧠 Key Decisions

  • Keep external images and external URLs unchanged.
  • Keep ZIP exports as the path for preserving local image assets.
  • Avoid exposing internal local asset paths when assets are not bundled.

🧪 Verification Guide

How to verify

  1. Run pnpm --filter @ocean-brain/client test -- note-export.spec.ts --run.
  2. Run pnpm --filter @ocean-brain/client lint.
  3. Run pnpm --filter @ocean-brain/client type-check.

Expected result

  • Document-only Markdown/HTML exports omit local images and local asset paths.
  • External images remain in the exported document.
  • All commands pass.

✅ Checklist

  • Lint completed
  • Type-check completed
  • Tests completed
  • Documentation updated (if needed)

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant