lisps / plugin-linksuggest

Dokuwiki Plugin
https://www.dokuwiki.org/plugin:linksuggest
GNU General Public License v2.0
8 stars 3 forks source link

No closing brackets when autocompleting link with # #15

Closed RealFoxie closed 11 months ago

RealFoxie commented 1 year ago

When typing [[page_link# and pressing enter for a choice, it will not add ]] to create a valid link. Is this by purpose? Otherwise this can easily be fixed by adding ]] to the following code. https://github.com/lisps/plugin-linksuggest/blob/d535af333b2d049f681865aca20744e17ff5469e/script.js#L133

bleistivt commented 1 year ago

I guess this may be intentional since you could also first autocomplete the page name and then type the # to autocomplete the section hash as well.

This is how we use the plugin in our wiki.

Both use cases could probably be covered by adding a second configuration for page section hashes not followed by | or ]]

RealFoxie commented 1 year ago

Yes that makes sense. I tested it out again and it seems to work logically. I'm not sure where my problem exactly came from. Even for existing links this way makes sense.

I'd still leave this issue open, because your comment is a good way to approach it and make it work in every way :)