0
0
Fork 0

Merge upstream

This commit is contained in:
무라쿠모 2024-10-04 22:41:58 +09:00
commit 8477922587
No known key found for this signature in database
GPG key ID: 139D6573F92DA9F7
288 changed files with 3268 additions and 1457 deletions

View file

@ -68,8 +68,8 @@ class Account < ApplicationRecord
DEFAULT_FIELDS_SIZE = 4
INSTANCE_ACTOR_ID = -99
USERNAME_RE = /[a-z0-9_]+([a-z0-9_.-]+[a-z0-9_]+)?/i
MENTION_RE = %r{(?<![=/[:word:]])@((#{USERNAME_RE})(?:@[[:word:].-]+[[:word:]]+)?)}
USERNAME_RE = /[a-z0-9_]+([.-]+[a-z0-9_]+)*/i
MENTION_RE = %r{(?<![=/[:word:]])@((#{USERNAME_RE})(?:@[[:word:]]+([.-]+[[:word:]]+)*)?)}
URL_PREFIX_RE = %r{\Ahttp(s?)://[^/]+}
USERNAME_ONLY_RE = /\A#{USERNAME_RE}\z/i
USERNAME_LENGTH_LIMIT = 72