Repository navigation
feat(storage): support filename variables in asset folders - #743
Merged
Merged
Conversation
Resolve document-based asset folders for local images, attachments, and cleanup while preserving existing links after document renames. Closes #742
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The local image folder now supports
${filename}, using the current document name without its extension. For example,${filename}.assetssaves images inserted intonote.mdundernote.assets/;assets/${filename}and repeated placeholders also work. Existing static folder settings keep their behavior.#characters.Closes #742.
Validation
297 relevant automated tests passed:
corepack pnpm --filter @markra/markdown test— 59 testscorepack pnpm --filter @markra/app test src/lib/workspace-assets.test.ts src/hooks/useMarkdownFileTree.test.tsx src/hooks/useWorkspaceAssetCleanup.test.tsx src/lib/image-upload.test.ts src/lib/settings/editor-preferences.test.ts src/components/settings/StorageSettings.test.tsx— 98 tests; affected tree/index tests rerun after final changescorepack pnpm --filter @markra/web test— 50 testscargo test --lib markdown_files::(inapps/desktop/src-tauri) — 90 tests, including real temporary-filesystem saves and cleanupcorepack pnpm --filter @markra/markdown --filter @markra/app --filter @markra/web typecheck:test— passedcorepack pnpm build— passed; web build and test typecheck rerun after the final URL-decoding changecargo fmt --checkandgit diff --check— passedNew behavior tests were run failing before implementation. Interactive desktop QA was not run.