Hi @julian and @baris,
Took some time to review the plugin code and twitter's @Mention code. Originally I thought the issue was due to non-unicode regex, but it turns out your search string was perfect.
I should have mentioned that I am using nodebb-plugin-composer-redactor (and yeah, I am dying to replace it with nodebb-plugin-composer-quill once the plugin is completed
- its almost showtime: see: https://community.nodebb.org/topic/12856/nodebb-plugin-composer-quill-wysiwyg-alternative-to-redactor).
Well, it turns out that redactor inserts html tags into the post content, and while the mention plugin was 99.9999(+Ɛ)% redactor proof, it was missing a tiny piece of code that gets rid of the tags.
To that end, kindly consider the following very minor changes to the mention plugin:
- In package.json add the lib:
"striptags": "^3.1.1"
- In library.js add striptags:
Line 20:
var striptags = require('striptags');
Line: 80:
var cleanedContent = Mentions.clean(striptags(postData.content, [], '\n'), true, true, true);
That's it. Once done, Redactor will work with Mentions and RTL languages will be supported as a bonus.
You may want to close the below issue in github once said changes are committed: https://github.com/julianlam/nodebb-plugin-mentions/issues/60
I got to learn Regex today and went to sleep dreaming of solving the mysteries of the universe with unicode search strings.
Have fun 
JJ.