diff options
author | multiple creatures <dev@multiple-creature.party> | 2019-07-15 15:00:29 -0500 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2019-07-15 15:00:45 -0500 |
commit | 6daeca8a092e00851ab9bc75bd1810fab39f0cdb (patch) | |
tree | 80e37374e9ae70fe32b1c0c0b95e976c75f88122 | |
parent | 1c10ce6269b83639171402c9c7487bdee7a5fdce (diff) |
bangtags are not for eating >:o
-rw-r--r-- | app/services/post_status_service.rb | 4 |
1 files 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 |