obsidian-pandoc-reference-list icon indicating copy to clipboard operation
obsidian-pandoc-reference-list copied to clipboard

citekey enhancements (auto completion and more)

Open osmalpkoras opened this issue 1 year ago • 3 comments

Hello,

I started using your plugin for Obsidian and found the citekey feature a little lacking, so I quickly made some enhacements:

  • You can now use @"..." to search for multiple strings (seperated by the space character ) inside the reference key and title. The citekey suggestions only contain items that have a fuzzy match for all strings.
  • You can now use the citekey command's (@"...") suggestions feature when it is surrounded by whitespace (of any kind) or the following characters: -, (, ), [, ], {, }
  • I made modifications to the search settings to improve search results for citekey suggestions

Still To-Do: [ ] fix displaying citekey commands when they are surrounded by the characters mentioned above (whitespace (of any kind) or the following characters: -, (, ), [, ], {, })

I was able to fix the last issue by changing the preKey variable in parser.ts:64 like this:

const preKey = /[\s()[\]{}\-;]/;

I successfully tested it on my machine. However, since I had no time to dive into how citekeys are displayed, I do not know if this fix has unwanted consequences.

osmalpkoras avatar Oct 30 '23 12:10 osmalpkoras

This partly adresses issue #78

osmalpkoras avatar Oct 31 '23 07:10 osmalpkoras

@osmalpkoras thanks for your hint! I also came up with the same solution to issue #78 but actually without forking the plugin but by only replacing a character in the main.js of the plugin. See the issue...

rauchert avatar Nov 04 '23 12:11 rauchert

Hey @mgmeyers let me know if something needs to be done for this pull request or if I can help with other issues

osmalpkoras avatar Dec 01 '23 08:12 osmalpkoras