From 3d133d164146878048d703bc608f3ad6f6506ae4 Mon Sep 17 00:00:00 2001 From: multiple creatures Date: Thu, 19 Sep 2019 23:35:58 -0500 Subject: when converting in-body tags to out-of-body tags, only strip lines that are nothing but in-body tags --- app/services/post_status_service.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/services/post_status_service.rb') diff --git a/app/services/post_status_service.rb b/app/services/post_status_service.rb index 6377248e5..572f91d51 100644 --- a/app/services/post_status_service.rb +++ b/app/services/post_status_service.rb @@ -139,7 +139,7 @@ class PostStatusService < BaseService @text.gsub!('##', "\uf669") @tags |= Extractor.extract_hashtags(@text) @text.strip! - @text.gsub!(/^(?:#[\w:._·\-]+\s*)+|(?:#[\w:._·\-]+\s*)+\Z/, '') + @text.gsub!(/^(?:#[\w:._·\-]+\s*)+$/, '') @text.gsub!("\uf669", "##") @text.gsub!("\uf666", "#") end -- cgit