about summary refs log tree commit diff
path: root/app/services
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2019-09-24 21:42:09 -0500
committermultiple creatures <dev@multiple-creature.party>2019-09-24 21:42:09 -0500
commitfc08cd704b5ff608a53ef5292d6f96448a9a7602 (patch)
tree14d5a1286deb1f3242d91fc79959e11be3f22387 /app/services
parenteb05eea843686e42f6d96492ee20856259b28281 (diff)
unbreak tag conversion
Diffstat (limited to 'app/services')
-rw-r--r--app/services/post_status_service.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/app/services/post_status_service.rb b/app/services/post_status_service.rb
index 47d127386..a7275ea90 100644
--- a/app/services/post_status_service.rb
+++ b/app/services/post_status_service.rb
@@ -135,9 +135,12 @@ class PostStatusService < BaseService
   def extract_tags
     return unless '#'.in?(@text)
     @text = @text.dup if @text.frozen?
-    @text.gsub!(/^##/, "\uf666").gsub!('##', "\uf669")
+    @text.gsub!(/^##/, "\uf666")
+    @text.gsub!('##', "\uf669")
     @tags |= Extractor.extract_hashtags(@text)
-    @text.strip!.gsub!(/^(?:#[\w:._·\-]+\s*)+$/, '').strip!
+    @text.strip!
+    @text.gsub!(/^(?:#[\w:._·\-]+\s*)+$/, '')
+    @text.strip!
     @text.gsub!("\uf669", "##").gsub!("\uf666", "#")
   end