about summary refs log tree commit diff
path: root/app/models/tag.rb
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2020-01-26 01:04:51 -0600
committermultiple creatures <dev@multiple-creature.party>2020-01-26 01:04:51 -0600
commitab16388714bf3eb186df1473aaea91e6a9e2dce1 (patch)
tree58fe17dad6c26190366a131820621708be95567f /app/models/tag.rb
parentcb38a58997369fcc146469670213d3ac925ab4a1 (diff)
restore monsterfork hashtag parsing behavior
Diffstat (limited to 'app/models/tag.rb')
-rw-r--r--app/models/tag.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/tag.rb b/app/models/tag.rb
index a1265b2a5..cec030ff3 100644
--- a/app/models/tag.rb
+++ b/app/models/tag.rb
@@ -21,7 +21,7 @@ class Tag < ApplicationRecord
 
   has_one :account_tag_stat, dependent: :destroy
 
-  HASHTAG_NAME_RE = '([[:word:]_][[:word:]_·]*[[:alpha:]_·][[:word:]_·]*[[:word:]_])|([[:word:]_]*[[:alpha:]][[:word:]_]*)'
+  HASHTAG_NAME_RE =  '[[:word:]:._\-]*[[:alpha:]:._·\-][[:word:]:._\-]*'
   HASHTAG_RE = /(?:^|[^\/\)\w])#(#{HASHTAG_NAME_RE})/i
 
   validates :name, presence: true, uniqueness: true, format: { with: /\A(#{HASHTAG_NAME_RE})\z/i }