Open shenzo1 opened 3 years ago
Sorry for the long delay. This is probably issue #2 , which is a bug in DokuWiki itself. There's a work-around in that issue.
Thanks for your reply. I have tried that already and still having an issue. To clarify: when I make a rule for [Dd]okū, it does not recognize either dokū or Dokū. When I make a rule for dokū and Dokū separately, it works. Any other idea?
When there aren't any regular expression characters (like "["), the code takes a much simpler and faster path to detect automatic links. There are some oddities with the Doku regular expression parser. This might need another Doku hack similar to the one in issue #2.
I'll keep this issue open, but I'm not sure when I'll have a chance to look into it.
I was going to report on this, but found this older issue first... Will look at that workaround now.
This plugin is really amazing, all your plugins are, and you helped me with a custom solution in the past (purplenumbers and autolink plugins combined) so thanks again for that! Just wanted to say that. :)
Edit: enabling the "inword" option indeed worked for me! Now I'm only looking at decreasing duplicate entries with regex. But I noticed that regex returns all unique instances, not only once even if specified. That means Battlef?i?e?l?d? of Kuruksetra
now matches both "Battle of Kuruksetra" and "Battlefield of Kuruksetra", and marks up both as links, not only the first one. Maybe I just don't realise how this works, I'm still learning...
That's a good point. The "once" flag works with specific text, not regular expressions. I've submitted issue #21 for this, and fixed it.
And thank you! I'm glad you like the plugins!
I found this on your plugin's page:
I applied the patch, and now I don't need the inword flag. I think that is better suited to Chinese and such anyways.
I have encountered what seems to be a parsing issue with a special character at the end of a search string. Example: [Dd]okū is not autolinked correctly, whereas if I do [Dd]okūs or [Dd]okū word, it does. But Dokū and dokū both work correctly, so that is what I do now instead. Would you have any idea on what is going on?