mirror of
https://github.com/yingziwu/mastodon.git
synced 2026-02-21 01:33:17 +00:00
Fix hashtags not being picked up when full-width hash sign is used (#36103)
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
parent
402686c76c
commit
76053fb4a9
7 changed files with 27 additions and 10 deletions
|
|
@ -41,7 +41,7 @@ class Tag < ApplicationRecord
|
|||
HASHTAG_LAST_SEQUENCE = '([[:word:]_]*[[:alpha:]][[:word:]_]*)'
|
||||
HASHTAG_NAME_PAT = "#{HASHTAG_FIRST_SEQUENCE}|#{HASHTAG_LAST_SEQUENCE}".freeze
|
||||
|
||||
HASHTAG_RE = %r{(?<![=/)\p{Alnum}])#(#{HASHTAG_NAME_PAT})}
|
||||
HASHTAG_RE = %r{(?<![=/)\p{Alnum}])[#|#](#{HASHTAG_NAME_PAT})}
|
||||
HASHTAG_NAME_RE = /\A(#{HASHTAG_NAME_PAT})\z/i
|
||||
HASHTAG_INVALID_CHARS_RE = /[^[:alnum:]\u0E47-\u0E4E#{HASHTAG_SEPARATORS}]/
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue