about summary refs log tree commit diff
path: root/app/models/tag.rb
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2022-07-22 20:49:54 +0200
committerGitHub <noreply@github.com>2022-07-22 20:49:54 +0200
commit85d0e3474574d82fc653925560d2905cee43287e (patch)
tree20a7c49c820e8b5b7e2389408b6d8deb55fa1119 /app/models/tag.rb
parent0a61b000e3f10e9be3d8ae1cccf53caa3877a55a (diff)
parent1ceebf2710794dc35211a16ad3af7f834641a2ab (diff)
Merge pull request #1810 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
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 eebf3b47d..8929baf66 100644
--- a/app/models/tag.rb
+++ b/app/models/tag.rb
@@ -27,7 +27,7 @@ class Tag < ApplicationRecord
   has_many :followers, through: :passive_relationships, source: :account
 
   HASHTAG_SEPARATORS = "_\u00B7\u200c"
-  HASHTAG_NAME_RE    = "([[:alnum:]_][[:alnum:]#{HASHTAG_SEPARATORS}]*[[:alpha:]#{HASHTAG_SEPARATORS}][[:alnum:]#{HASHTAG_SEPARATORS}]*[[:alnum:]_])|([[:alnum:]_]*[[:alpha:]][[:alnum:]_]*)"
+  HASHTAG_NAME_RE    = "([[:word:]_][[:word:]#{HASHTAG_SEPARATORS}]*[[:alpha:]#{HASHTAG_SEPARATORS}][[:word:]#{HASHTAG_SEPARATORS}]*[[:word:]_])|([[:word:]_]*[[:alpha:]][[:word:]_]*)"
   HASHTAG_RE         = /(?:^|[^\/\)\w])#(#{HASHTAG_NAME_RE})/i
 
   validates :name, presence: true, format: { with: /\A(#{HASHTAG_NAME_RE})\z/i }