Merge pull request #766 from pafcu/autocomplete
Fix regex in contact autocomplete
This commit is contained in:
commit
bfc0b00d93
@ -7,7 +7,6 @@ function mysearch(term, callback, backend_url) {
|
|||||||
var postdata = {
|
var postdata = {
|
||||||
start:0,
|
start:0,
|
||||||
count:100,
|
count:100,
|
||||||
//search:term.substring(1),
|
|
||||||
search:term,
|
search:term,
|
||||||
type:'c',
|
type:'c',
|
||||||
}
|
}
|
||||||
@ -40,7 +39,7 @@ function replace(item) {
|
|||||||
|
|
||||||
// Autocomplete contacts
|
// Autocomplete contacts
|
||||||
contacts = {
|
contacts = {
|
||||||
match: /(^|\s)(@!?)(\w{2,})$/,
|
match: /(^|\s)(@\!*)([^ \n]+)$/,
|
||||||
index: 3,
|
index: 3,
|
||||||
search: function(term, callback) { mysearch(term, callback, backend_url); },
|
search: function(term, callback) { mysearch(term, callback, backend_url); },
|
||||||
replace: replace,
|
replace: replace,
|
||||||
|
Reference in New Issue
Block a user