improved exact_match filtering

This commit is contained in:
2010-03-15 13:46:24 +02:00
parent d1a6f8b003
commit 699877ec8a

View File

@@ -77,7 +77,7 @@
$.fn.suggest_results.search = function(elm, options){ $.fn.suggest_results.search = function(elm, options){
var self = $.fn.suggest_results; var self = $.fn.suggest_results;
var terms = (options.exact_match) ? $.trim(elm.val()) : elm.val().split(/\s/); var terms = (options.exact_match) ? $.trim(elm.val()) : $.trim(elm.val()).split(/\s+/);
if (typeof(options.url) === "string" && options.url !== "") { if (typeof(options.url) === "string" && options.url !== "") {
self.query_for_data(elm, options); self.query_for_data(elm, options);
} else { } else {