Merge branch 'username-matching' of https://github.com/jonasob/wekan into jonasob-username-matching

This commit is contained in:
Lauri Ojansivu 2017-08-26 03:24:55 +03:00
commit 27340ec8f7
3 changed files with 4 additions and 4 deletions

View file

@ -180,7 +180,7 @@ BlazeComponent.extendComponent({
$textarea.escapeableTextComplete([
// User mentions
{
match: /\B@(\w*)$/,
match: /\B@([\w.]*)$/,
search(term, callback) {
const currentBoard = Boards.findOne(Session.get('currentBoard'));
callback($.map(currentBoard.activeMembers(), (member) => {

View file

@ -25,7 +25,7 @@ Template.editor.onRendered(() => {
// User mentions
{
match: /\B@(\w*)$/,
match: /\B@([\w.]*)$/,
search(term, callback) {
const currentBoard = Boards.findOne(Session.get('currentBoard'));
callback(currentBoard.activeMembers().map((member) => {
@ -60,7 +60,7 @@ Blaze.Template.registerHelper('mentions', new Template('mentions', function() {
member.username = Users.findOne(member.userId).username;
return member;
});
const mentionRegex = /\B@(\w*)/gi;
const mentionRegex = /\B@([\w.]*)/gi;
let content = Blaze.toHTML(view.templateContentBlock);
let currentMention;