Prevent JS mention autocomplete for e-mails (#2655)

This commit is contained in:
Type-kun
2016-09-09 00:00:42 +05:00
parent 756881966a
commit d1674e4cbb

View File

@@ -68,8 +68,12 @@
}
if (req.term[i-1] === "@") {
name = req.term.substring(i, cursor);
break;
if (i == 1 || /[ \r\n]/.test(req.term[i-2])) {
name = req.term.substring(i, cursor);
break;
} else {
return;
}
}
}