about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/services/post_status_service.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/services/post_status_service.rb b/app/services/post_status_service.rb
index dd4c801bd..6f4be1cfe 100644
--- a/app/services/post_status_service.rb
+++ b/app/services/post_status_service.rb
@@ -106,8 +106,8 @@ class PostStatusService < BaseService
   def extract_tags
     chunks = []
     @text.split(/^((?:#[\w:._·\-]+\s*)+)/).each do |chunk|
-      if chunk.start_with?('#') && !chunk.start_with?('#!')
-        @tags |= chunk[1..-1].split(/\s+/)
+      if chunk.match?(/\A#[\w:._·\-]/)
+        @tags |= chunk.strip.gsub('#', '').split(/\s+/)
       else
         chunks << chunk
       end