From 6daeca8a092e00851ab9bc75bd1810fab39f0cdb Mon Sep 17 00:00:00 2001 From: multiple creatures Date: Mon, 15 Jul 2019 15:00:29 -0500 Subject: [PATCH] bangtags are not for eating >:o --- app/services/post_status_service.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/services/post_status_service.rb b/app/services/post_status_service.rb index e34430f09..8fbf9d9b6 100644 --- a/app/services/post_status_service.rb +++ b/app/services/post_status_service.rb @@ -105,8 +105,8 @@ class PostStatusService < BaseService # move tags out of body so we can format them later def extract_tags chunks = [] - @text.split(/^((?:#[\w:._·\-]*\s*)+)/).each do |chunk| - if chunk.start_with?('#') + @text.split(/^((?:#[\w:._·\-]+\s*)+)/).each do |chunk| + if chunk.start_with?('#') && !chunk.start_with?('#!') @tags |= chunk[1..-1].split(/\s+/) else chunks << chunk