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

[Bug] Selecting alias of the same name as the contact filename from popup list enters link to [[contact]] not [[contact|contact]] #32

Open
redactedscribe opened this issue May 14, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@redactedscribe
Copy link

Describe the bug

If I have a contact file named @bob and it also has aliases: [ "@bob" ], typing the characters @bo into a note shows the suggestions popup list with two @bobs listed, only one with an arrow next to it indicating that it's an alias. Selecting the alias link to @bob from this list enters [[@bob]] into the note when it should be entering [[@bob|@bob]].

If the alias was something else, e.g. "@bob2", then selecting the alias link to @bob would enter [[@bob|@bob2]]. It seems the plugin is choosing to ignore entering the alias if it's identical to the contact filename when arguably this shouldn't be happening, hence a bug report rather than a feature request. I'm picking the alias @bob after all, not the @bob note which is also listed in the popup.

So far I've been linking via wikilink syntax instead of using the @ symbol: Typing [[@bo suggests the alias @Bob and correctly enters [[@bob|@bob]].

To Reproduce
Steps to reproduce the behavior:

  1. Create a contact named @bob.
  2. Give it an alias of "@bob".
  3. Link to bob: Type @bo, select the @bob alias link (has an arrow next to it).
  4. Result is [[@bob]] not [[@bob|@bob]].

Expected behavior

[[@bob|@bob]].

Screenshots
-

In case it matters, I have the "Include @ symbol" option disabled for the plugin.

Aha. This looks to be related to #14, which was fixed, but the fix was too broad it seems. If "Include @ symbol" is disabled, it shouldn't prevent an alias of the same name being entered, i.e. [[@bob|@bob]]. If "Include @ symbol" is disabled and there is no "@bob" alias, just enter [[@bob]]. If "Include @ symbol" is enabled, we'd also expect [[@bob|@bob]], even when the file doesn't specify an "@bob" alias.

Thanks.

@redactedscribe redactedscribe added the bug Something isn't working label May 14, 2024
@redactedscribe
Copy link
Author

redactedscribe commented May 14, 2024

To be clear, even if the filename is A and its alias is A (i.e. no @s involved), selecting the alias link from the popup list which @ triggers simply enters [[A]], not [[A|A]].

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant