|
@ -438,8 +438,9 @@ $.fn.search = function(parameters) { |
|
|
searchFields = $.isArray(settings.searchFields) |
|
|
searchFields = $.isArray(settings.searchFields) |
|
|
? settings.searchFields |
|
|
? settings.searchFields |
|
|
: [settings.searchFields], |
|
|
: [settings.searchFields], |
|
|
searchRegExp = new RegExp(regExp.exact + searchTerm, 'i'), |
|
|
|
|
|
fullTextRegExp = new RegExp(searchTerm, 'i') |
|
|
|
|
|
|
|
|
searchExp = searchTerm.replace(regExp.escape, '\\$&'), |
|
|
|
|
|
searchRegExp = new RegExp(regExp.exact + searchExp, 'i'), |
|
|
|
|
|
fullTextRegExp = new RegExp(searchExp, 'i') |
|
|
; |
|
|
; |
|
|
|
|
|
|
|
|
source = source || settings.source; |
|
|
source = source || settings.source; |
|
@ -900,7 +901,8 @@ $.fn.search.settings = { |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
regExp: { |
|
|
regExp: { |
|
|
exact: '(?:\s|^)' |
|
|
|
|
|
|
|
|
escape : /[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, |
|
|
|
|
|
exact : '(?:\s|^)' |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
selector : { |
|
|
selector : { |
|
|