Showing the changes to assets/javascripts (1 of 1 file). Show all
Unified · Split
| @@ -26,7 +26,7 @@ return unless index >= 0 · 25 unmodified lines | ||
| 26 | 26 | lastIndex = value.lastIndexOf(query) |
| 27 | 27 | |
| 28 | 28 | if index isnt lastIndex |
| 29 | − return Math.max(scoreExactMatch(), (index = lastIndex) and scoreExactMatch()) | |
| 29 | + return Math.max(scoreExactMatch(), ((index = lastIndex) and scoreExactMatch()) or 0) | |
| 30 | 30 | else |
| 31 | 31 | return scoreExactMatch() |
| 32 | 32 | `}` |
| @@ -112,7 +112,7 @@ class app.Searcher · 79 unmodified lines | ||
| 112 | 112 | max_results: app.config.max_results |
| 113 | 113 | fuzzy_min_length: 3 |
| 114 | 114 | |
| 115 | − SEPARATORS_REGEXP = /\:?\ |#|::|->|\$(?=\w)|\-(?=\w)/g | |
| 115 | + SEPARATORS_REGEXP = /#|::|:-|->|\$(?=\w)|\-(?=\w)|\:(?=\w)|\ [\/\-&]\ |:\ |\ /g | |
| 116 | 116 | INFO_PARANTHESES_REGEXP = /\ \(\w+?\)$/ |
| 117 | 117 | EMPTY_PARANTHESES_REGEXP = /\(\)/ |
| 118 | 118 | EVENT_REGEXP = /\ event$/ |
| @@ -166,7 +166,7 @@ class app.Searcher · 47 unmodified lines | ||
| 166 | 166 | return |
| 167 | 167 | |
| 168 | 168 | isValid: -> |
| 169 | − queryLength > 0 | |
| 169 | + queryLength > 0 and query isnt SEPARATOR | |
| 170 | 170 | |
| 171 | 171 | end: -> |
| 172 | 172 | @triggerResults [] unless @totalResults |