This commit is contained in:
Toks
2013-06-22 12:45:10 -04:00
parent 7726e85e33
commit ee1da0aff9

View File

@@ -47,11 +47,13 @@
return false;
},
source: function(req, resp) {
if (req.term.match(/ $/)) {
var pre_caret_text = req.term.substring(0, this.element.get(0).selectionStart);
if (pre_caret_text.match(/ $/)) {
return;
}
var term = req.term.match(/\S+/g).pop();
var term = pre_caret_text.match(/\S+/g).pop();
$.ajax({
url: "/tags.json",
data: {