Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: correctly render cross-vault note references in preview v2 #1310

Merged
merged 9 commits into from
Sep 8, 2021

Conversation

hikchoi
Copy link
Contributor

@hikchoi hikchoi commented Sep 8, 2021

fix: correctly render cross-vault note references in preview v2

This fixes note ref rendering in preview v2 and publishing so that cross-vault note references without an explicit vault prefix still gets rendered if there is no ambiguity.

  • Assume vault of cross-vault note references if there is no vault prefix and only one note with the same name exists.
  • Render an error message if there is ambiguity (if vault1 and vault2 has the same note bar, ![[bar]] will show an error.
    • This will first attempt to handle duplicates if duplicateNoteBehavior is set.
  • Render an error message if a wildcard note reference has no match.
  • Render note reference related error messages in a block quote to make it more visible.

docs: N/A

Pull Request Checklist

You can go to dendron pull requests to see full details for items in this checklist.

General

Quality Assurance

  • add a test for the new feature
  • make sure all the existing tests pass
  • do a spot check by running your feature with our test workspace
  • after you submit your pull request, check the output of our integration test and make sure all tests pass
    • NOTE: if you running mac/linux, check the windows output and vice versa if you are developing on windows

Special Cases

  • if your tests changes an existing snaphot, make sure that snapshots are updated
  • [~] if you are adding a new language feature (graphically visible in vscode/preview/publishing), make sure that it is included in test-workspace. We use this to manually inspect new changes and for auto regression testiing

Docs

  • Make sure that the PR title follows our commit style
  • Please summarize the feature or impact in 1-2 lines in the PR description
  • [~] If your change reflects documentation changes, also submit a PR to dendron-site and mention the doc PR link in your current PR

@kevinslin kevinslin merged commit 1198449 into master Sep 8, 2021
@kevinslin kevinslin deleted the fix/previewv2-ref-render branch September 21, 2021 20:01
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.

None yet

3 participants