/* @flow */

import findWithRegex from 'find-with-regex';
import escapeRegExp from 'lodash.escaperegexp';

export default (trigger: String) => (contentBlock: Object, callback: Function) => {
  findWithRegex(new RegExp(`(\\s|^)${escapeRegExp(trigger)}[\\w]*`, 'g'), contentBlock, callback);
};

@@ -247,16 +247,29 @@
 er)%7D%5B%5C%5Cw
+%5Cu4e00-%5Cu9eff
 %5D*%60, 'g'

add Chinese support in mention plugin