Browse Source

Improve search for entries with "-" in the name

Thibaut Courouble 9 năm trước cách đây
mục cha
commit
9c9b2aca0d
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      assets/javascripts/app/searcher.coffee

+ 1 - 1
assets/javascripts/app/searcher.coffee

@@ -112,7 +112,7 @@ class app.Searcher
     max_results: app.config.max_results
     fuzzy_min_length: 3
 
-  SEPARATORS_REGEXP = /\:?\ |#|::|->|\$(?=\w)/g
+  SEPARATORS_REGEXP = /\:?\ |#|::|->|\$(?=\w)|\-(?=\w)/g
   INFO_PARANTHESES_REGEXP = /\ \(\w+?\)$/
   EMPTY_PARANTHESES_REGEXP = /\(\)/
   EVENT_REGEXP = /\ event$/