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

1.38.0 - if cursor is on the line of the heading, "copy URI for current file" command includes heading link #142

Closed
luckman212 opened this issue Aug 24, 2023 · 5 comments

Comments

@luckman212
Copy link
Contributor

Seems that if cursor is on the line of the heading, then the output is what you would get from "copy URI for current block"

example

# Foo
^---cursor here, execute "Advanced URI: copy URI for current file" command 

abc

# Bar

xxx

expected:

obsidian://advanced-uri?vault=Main&uid=1a235bde-4067-4958-bb13-8eb0d5349650

actual:

obsidian://advanced-uri?vault=Main&heading=Foo&uid=1a235bde-4067-4958-bb13-8eb0d5349650
@luckman212
Copy link
Contributor Author

Hmm, actually I see "copy URI for current block" generates a unique ID and a block= parameter. So maybe this is actually intended behavior?

@Vinzent03
Copy link
Owner

Yeah this is the intended behavior to automatically get a link to the current heading in the note. The command for current block is different and goes further by creating a block reference.

@luckman212
Copy link
Contributor Author

Maybe would be cool to have a separate command or a toggle to make the command distinctly include the heading link or not. (in my case, most of the time I don't actually want it)

@Vinzent03
Copy link
Owner

Hmm I think there are already enough commands and that's not really worth to add another. The heading is only included if the cursor is in the line of the heading, so why don't put the cursor somewhere else?

@luckman212
Copy link
Contributor Author

Understood. No problem. Just have to get used to it. Or, I can always just trim the parameter from the copied URL after.

@Vinzent03 Vinzent03 closed this as not planned Won't fix, can't repro, duplicate, stale Aug 26, 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

No branches or pull requests

2 participants