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

feat: detect and handle urls in :ObsidianFollowLink #123

Merged
merged 1 commit into from
Apr 20, 2023

Conversation

pbogut
Copy link
Contributor

@pbogut pbogut commented Apr 18, 2023

Following on #122 .

I have implemented URL detection in :ObsidianFollowLink and added a default behavior to ignore URLs to prevent the creation of new files for external links (e.g., 'https://example.com/').

Additionally, I have added a new configuration option, follow_url_func, which allows users to define their own custom behavior when following URLs. This enables users to have more control over what happens when they follow a link, while avoiding the need for :ObsidianFollowLink to make assumptions or guesses about user preferences, and handling system differences.

Copy link
Owner

@epwalsh epwalsh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two minor comments otherwise looks good!

doc/obsidian.txt Outdated Show resolved Hide resolved
lua/obsidian/command.lua Outdated Show resolved Hide resolved
Copy link
Owner

@epwalsh epwalsh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Thanks again @pbogut

@epwalsh epwalsh merged commit 8c23830 into epwalsh:main Apr 20, 2023
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