fix tag extraction failing on text in frozen state

staging
multiple creatures 2019-08-01 14:56:49 -05:00
parent 720207cf4b
commit c4005a0b25
1 changed files with 2 additions and 0 deletions

View File

@ -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)