Fix wrongful matching of last period in extended usernames
Fix anchor tags in some wikipedia URLs being matches as a hashtag
This commit is contained in:
parent
5f4e402204
commit
4fb95c91fb
4 changed files with 20 additions and 3 deletions
|
@ -3,7 +3,7 @@
|
|||
class Tag < ApplicationRecord
|
||||
has_and_belongs_to_many :statuses
|
||||
|
||||
HASHTAG_RE = /(?:^|[^\/\w])#([[:word:]_]*[[:alpha:]_][[:word:]_]*)/i
|
||||
HASHTAG_RE = /(?:^|[^\/\)\w])#([[:word:]_]*[[:alpha:]_][[:word:]_]*)/i
|
||||
|
||||
validates :name, presence: true, uniqueness: true
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue