jakiestfu / Mention.js

Lightweight wrapper for adding @user mention functionality to Twitter Bootstraps Typeahead plugin
http://jakiestfu.github.com/Mention.js/
MIT License
750 stars 144 forks source link

Ignore emails when using @ token #27

Open smilesrg opened 9 years ago

smilesrg commented 9 years ago

how to ignore email entries when using @ token? Just use: delimiter: '(^|\\s)@' option. Please add it to description or fix issue right in plugin code.

tchalvak commented 9 years ago

That is a good catch!

AlexHaaniWink commented 6 years ago

That doesn't work when emptyQuery is set to true because that part of the check in _matcher is not based on a regular expression. I found it easier to assume you simply use a single character as delimiter and you'd never want to match when there's a word-character in front of that delimiter. See pull request: https://github.com/jakiestfu/Mention.js/pull/52