|
|
|
@ -26,7 +26,7 @@ return unless index >= 0
|
|
|
|
|
lastIndex = value.lastIndexOf(query)
|
|
|
|
|
|
|
|
|
|
if index isnt lastIndex
|
|
|
|
|
return Math.max(scoreExactMatch(), (index = lastIndex) and scoreExactMatch())
|
|
|
|
|
return Math.max(scoreExactMatch(), ((index = lastIndex) and scoreExactMatch()) or 0)
|
|
|
|
|
else
|
|
|
|
|
return scoreExactMatch()
|
|
|
|
|
`}`
|
|
|
|
@ -112,7 +112,7 @@ class app.Searcher
|
|
|
|
|
max_results: app.config.max_results
|
|
|
|
|
fuzzy_min_length: 3
|
|
|
|
|
|
|
|
|
|
SEPARATORS_REGEXP = /\:?\ |#|::|->|\$(?=\w)|\-(?=\w)/g
|
|
|
|
|
SEPARATORS_REGEXP = /#|::|:-|->|\$(?=\w)|\-(?=\w)|\:(?=\w)|\ [\/\-&]\ |:\ |\ /g
|
|
|
|
|
INFO_PARANTHESES_REGEXP = /\ \(\w+?\)$/
|
|
|
|
|
EMPTY_PARANTHESES_REGEXP = /\(\)/
|
|
|
|
|
EVENT_REGEXP = /\ event$/
|
|
|
|
@ -166,7 +166,7 @@ class app.Searcher
|
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
isValid: ->
|
|
|
|
|
queryLength > 0
|
|
|
|
|
queryLength > 0 and query isnt SEPARATOR
|
|
|
|
|
|
|
|
|
|
end: ->
|
|
|
|
|
@triggerResults [] unless @totalResults
|
|
|
|
|