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

New setting that allows not to override the selected text with fetched link #109

Merged
merged 3 commits into from
Apr 17, 2024

Conversation

neoromantic
Copy link
Contributor

Based on #50

Very simple PR that:

  • adds a new setting
  • in case if it's enabled, respects existing text selection as title

@neoromantic
Copy link
Contributor Author

@zolrath any chance on merging this?

@math-feng
Copy link

[[Real_Analysis-Folland -.pdf#page=73&selection=2,0,5,3&color=yellow]]

Links formatted like this won't work, can you fix this please, thank you very much!

@zolrath
Copy link
Owner

zolrath commented Apr 17, 2024

Hi, I like this idea, sorry for the delay!
I'm fairly certain the "Replace Selection" option was intended to be this behavior but was never actually implemented!

Let's merge these options and have the behavior use your logic instead.

Thanks for the PR!

@zolrath zolrath merged commit 3f19a79 into zolrath:main Apr 17, 2024
@reagle
Copy link

reagle commented May 6, 2024

FYI: I've long used both obsidian-auto-link-title and obsidian-url-into-selection and they worked well together:

  • if I was pasting a URL with nothing selected (into an empty caret/space) auto-link title would create a title and link.
  • if I was pasting int selected text, obsidian-url-into-selection would make it hypertextual.

With this update, they are both doing their thing at the same time, leading to a redundant link.
However, if I enable Preserve selection as title and remove obsidian-url-into-selection, things work well again.

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.

4 participants