diff options
author | multiple creatures <dev@multiple-creature.party> | 2019-07-17 01:29:33 -0500 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2019-07-17 01:34:42 -0500 |
commit | 5e3a120120720e42759960e246caea6928571ffb (patch) | |
tree | de27552b016c7789ef1c6f50e3ea01dc36cad9ad /app | |
parent | 38a3c2b7b9b2d11ffb586acd051ed755b9377cea (diff) |
fix parsing of tags for folding
Diffstat (limited to 'app')
-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 dd4c801bd..6f4be1cfe 100644 --- a/app/services/post_status_service.rb +++ b/app/services/post_status_service.rb @@ -106,8 +106,8 @@ class PostStatusService < BaseService def extract_tags chunks = [] @text.split(/^((?:#[\w:._·\-]+\s*)+)/).each do |chunk| - if chunk.start_with?('#') && !chunk.start_with?('#!') - @tags |= chunk[1..-1].split(/\s+/) + if chunk.match?(/\A#[\w:._·\-]/) + @tags |= chunk.strip.gsub('#', '').split(/\s+/) else chunks << chunk end |