lisps / plugin-linksuggest

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

Page Section Search: Prevent failure when a pagenames is a prefix #11

Closed bleistivt closed 2 years ago

bleistivt commented 3 years ago

If you have two pages in a namespace with one being a prefix of the other (e.g. "episoden" and "episoden-videos"), adding the # will correctly trigger the page section search. The backend however only returns section results if count($data) === 1. So if there are still two results, the plugin will insert a link like [[#undefined since it gets page results but expects section results.