This website works better with JavaScript.
Home
Explore
Help
Sign In
closed-social
/
mastodon
Watch
3
Star
0
Fork
2
Code
Issues
5
Pull Requests
0
Projects
0
Releases
3
Wiki
Activity
Browse Source
Fix MENTION_RE to not match nil usernames (
#6862
)
pull/4/head
ThibG
6 years ago
committed by
Eugen Rochko
parent
f66a786029
commit
6f531d140b
1 changed files
with
1 additions
and
1 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+1
-1
app/models/account.rb
+ 1
- 1
app/models/account.rb
View File
@ -48,7 +48,7 @@
class
Account
<
ApplicationRecord
USERNAME_RE
=
/
[a-z0-9_]+([a-z0-9_
\
.]+[a-z0-9_]+)?
/i
MENTION_RE
=
/
(?<=^|[^
\/
[:word:]])@((
#{
USERNAME_RE
}
?
)(?:@[a-z0-9
\
.
\
-]+[a-z0-9]+)?)
/i
MENTION_RE
=
/
(?<=^|[^
\/
[:word:]])@((
#{
USERNAME_RE
}
)(?:@[a-z0-9
\
.
\
-]+[a-z0-9]+)?)
/i
include
AccountAvatar
include
AccountFinderConcern
Write
Preview
Loading…
Cancel
Save