Project

General

Profile

Defect #26892 » 0001-user-link-syntax-should-work-also-with-logins-in-upp.patch

Marius BĂLTEANU, 2018-04-08 09:38

View differences:

app/helpers/application_helper.rb
)|
(
(?<sep4>@)
(?<identifier3>[a-z0-9_\-@\.]*)
(?<identifier3>[A-Za-z0-9_\-@\.]*)
)
)
(?=
test/helpers/application_helper_test.rb
"http://foo.bar/FAQ#3" => '<a class="external" href="http://foo.bar/FAQ#3">http://foo.bar/FAQ#3</a>',
# user
'user:jsmith' => link_to_user(User.find_by_id(2)),
'user:JSMITH' => link_to_user(User.find_by_id(2)),
'user#2' => link_to_user(User.find_by_id(2)),
'@jsmith' => link_to_user(User.find_by_id(2)),
'@JSMITH' => link_to_user(User.find_by_id(2)),
'@abcd@example.com' => link_to_user(User.find_by_id(u_email_id)),
'user:abcd@example.com' => link_to_user(User.find_by_id(u_email_id)),
'@foo.bar@example.com' => link_to_user(User.find_by_id(u_email_id_2)),
    (1-1/1)