zioth / dokuwiki-autolink4

Dokuwiki plugin which automatically turns specified keywords into links to other wiki pages, similar to the default functionality of MediaWiki.
MIT License
0 stars 2 forks source link

I'm having issues with the "once" flag #20

Closed vaniwiki closed 5 months ago

vaniwiki commented 5 months ago

When I use "once" option, instead of removing subsequent entries of the same, it replaces the link text with "start". All the links are still visible on the page. I would love to see this plugin working like a charm, as then my wiki namespace could be populated with automatic links to other articles in the same namespace...

I am using DokuWiki Kaos with latest ComboStrap.

zioth commented 5 months ago

There are two bugs here:

  1. The "once" logic is broken. It's rendering every time instead of just once, and with the wrong link and text.
  2. The latest version of DokuWiki has an extra render step before the step that renders content on the page. Since we execute the "once" code in the handler, not the renderer, the "once" code is never properly used to render anything on the page.
zioth commented 5 months ago

Fixed!