Project

General

Profile

Defect #34894 » Fixes_user_mention_at_the_end_of_line_.patch

Dmitry Makurin , 2021-03-15 13:54

View differences:

test/helpers/application_helper_test.rb (revision 36a4ecb90df050e08a5a1c5fae27d943e6c8cf5c) → test/helpers/application_helper_test.rb (date 1615812440651)
end
end
def test_parse_redmine_links_should_correctly_handle_user_login_at_line_end
expected = "<p>#{link_to_user(User.find_by(:id => 2))}.</p>"
%w[<p>@jsmith.</p> <p>user:jsmith.</p> <p>user#2.</p>].each do |text|
s = +text
parse_redmine_links(s, nil, nil, nil, true, {})
assert_equal expected, s
end
end
private
def wiki_links_with_special_characters
app/helpers/application_helper.rb (revision 36a4ecb90df050e08a5a1c5fae27d943e6c8cf5c) → app/helpers/application_helper.rb (date 1615812094494)
)|
(
(?<sep4>@)
(?<identifier3>[A-Za-z0-9_\-@\.]*)
(?<identifier3>[A-Za-z0-9_\-@\.]*?)
)
)
(?=
(1-1/2)