about summary refs log tree commit diff
path: root/app/services
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2019-07-17 01:29:33 -0500
committermultiple creatures <dev@multiple-creature.party>2019-07-17 01:34:42 -0500
commit5e3a120120720e42759960e246caea6928571ffb (patch)
treede27552b016c7789ef1c6f50e3ea01dc36cad9ad /app/services
parent38a3c2b7b9b2d11ffb586acd051ed755b9377cea (diff)
fix parsing of tags for folding
Diffstat (limited to 'app/services')
-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