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

Different namespaces ignored for the same pattern #14

Closed pparik closed 1 year ago

pparik commented 1 year ago

I use the Translation plugin, so the pages have the same name except for the root namespace (cs: or en:). I have configured the Auto Link plugin to create links to the appropriate translation like this:

name\.i1, cs:ref:name:i1, cs
name\.i1, en:ref:name:i1, en

but this always creates links to cs:ref:name:i1, even in en namespace. If I switch the two lines, then all links are created to en:ref:name:i1. So there is clearly a bug with duplicate patterns where the page name in the first pattern+namespace definition is used regardless of the actually matched pattern+namespace definition.

zioth commented 1 year ago

Interesting. It might take some time for me to get to this. If you don't hear from me after a while, feel free to bug me again by adding a comment to this issue.

zioth commented 1 year ago

Fixed! The plugin should now work when you have the same pattern in two namespaces.

In the future, I might consider adding more direct translation plugin compatibility, so you don't have to include the same pattern multiple times.

pparik commented 1 year ago

Thank you! Updated and working :)