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 #8: Allow internal links #13

Merged
merged 1 commit into from
Feb 20, 2024
Merged

Conversation

davisriedel
Copy link
Contributor

@matthewhchan thank you for your awesome plugin!

This PR allows using internal links (e.g. [[test]]) in the plugin. As I needed the feature myself and saw that there also was an open issue asking for it, I decided to implement it.

While this was possible using the Obsidian URI-scheme obsidian://open?file=$1, I believe this is not very user friendly, as it is not obvious and you have to URI encode the destination file path. Now you can just enter an internal link as target.

Once a match is detected, we check if the target is an internal link, and if so we open the file directly in Obsidian. Otherwise we open the external link.

Note: I also had to update some dependencies, because I was getting an error with codemirror types. I suggest commiting the lockfile to the repo.

@matthewhchan matthewhchan merged commit ec54db9 into matthewhchan:main Feb 20, 2024
@matthewhchan
Copy link
Owner

Thanks for the PR.

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.

2 participants