diff options
author | multiple creatures <dev@multiple-creature.party> | 2019-08-01 14:56:49 -0500 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2019-08-01 14:56:49 -0500 |
commit | c4005a0b25841dcc6c45aea97ed7acc7aeb12955 (patch) | |
tree | b57d1df1660f552edc85cc70499eec2673b022f6 /app | |
parent | 720207cf4b6d4db5e9b0ba10ad8b9b59ce730784 (diff) |
fix tag extraction failing on text in frozen state
Diffstat (limited to 'app')
-rw-r--r-- | app/services/post_status_service.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/services/post_status_service.rb b/app/services/post_status_service.rb index e8f785db5..cc42289d8 100644 --- a/app/services/post_status_service.rb +++ b/app/services/post_status_service.rb @@ -113,6 +113,8 @@ class PostStatusService < BaseService # move tags out of body so we can format them later def extract_tags + return unless '#'.in?(@text) + @text = @text.dup if @text.frozen? @text.gsub!(/^##/, "\uf666") @text.gsub!('##', "\uf669") @tags |= Extractor.extract_hashtags(@text) |