about summary refs log tree commit diff
path: root/app/helpers/search_helper.rb
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2019-12-10 05:33:44 -0600
committermultiple creatures <dev@multiple-creature.party>2019-12-10 05:33:44 -0600
commit302f532440d0bfad1784d9b696e099af9d5a3246 (patch)
tree8362cddc2012e185e6a9c446441b7128c63f65d0 /app/helpers/search_helper.rb
parent2da941beaab17923ec72af0c2e2d8de6c62cd20e (diff)
fix newlines in normalized text + make `tag` & `tags` headings mean the same thing
Diffstat (limited to 'app/helpers/search_helper.rb')
-rw-r--r--app/helpers/search_helper.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/helpers/search_helper.rb b/app/helpers/search_helper.rb
index 991ba533b..9510abe99 100644
--- a/app/helpers/search_helper.rb
+++ b/app/helpers/search_helper.rb
@@ -7,8 +7,8 @@ module SearchHelper
 
     if query.include?(':')
       query_parts = query.split(':', 2)
-      if query_parts[0] == 'tags'
-        query = "^tags .*(#{query_parts[1].split.join('|')})"
+      if %w(tag tags).include?(query_parts[0])
+        query = "^tag (#{query_parts[1].split.join('|')})"
       elsif %w(subj text desc).include?(query_parts[0])
         query = "^#{query_parts[0]} .*#{query_parts[1]}"
       end