History

Fix parenthesis normalizaation in search strings

Thibaut committed 11 years ago

Commit 93dcd381 parent f182fb51 file · +4 −2Browse files

Unified · Split

assets/javascripts/app/searcher.coffee+4−2
@@ -113,7 +113,8 @@ class app.Searcher · 112 unmodified lines
113113 fuzzy_min_length: 3
114114
115115 SEPARATORS_REGEXP = /\:?\ |#|::|->/g
116− PARANTHESES_REGEXP = /\(\w.*?\)$/
116+ INFO_PARANTHESES_REGEXP = /\(\w+?\)$/
117+ EMPTY_PARANTHESES_REGEXP = /\(\)/
117118 EVENT_REGEXP = /\ event$/
118119 DOT_REGEXP = /\.+/g
119120 WHITESPACE_REGEXP = /\s/g
@@ -129,7 +130,8 @@ class app.Searcher · 9 unmodified lines
129130 .replace EVENT_REGEXP, EMPTY_STRING
130131 .replace SEPARATORS_REGEXP, SEPARATOR
131132 .replace DOT_REGEXP, SEPARATOR
132− .replace PARANTHESES_REGEXP, EMPTY_STRING
133+ .replace INFO_PARANTHESES_REGEXP, EMPTY_STRING
134+ .replace EMPTY_PARANTHESES_REGEXP, EMPTY_STRING
133135 .replace WHITESPACE_REGEXP, EMPTY_STRING
134136
135137 constructor: (options = {}) ->