@@ -742,7 +742,7 module ApplicationHelper | |||
|
742 | 742 | # identifier:source:some/file |
|
743 | 743 | def parse_redmine_links(text, default_project, obj, attr, only_path, options) |
|
744 | 744 | text.gsub!(%r{<a( [^>]+?)?>(.*?)</a>|([\s\(,\-\[\>]|^)(!)?(([a-z0-9\-_]+):)?(attachment|document|version|forum|news|message|project|commit|source|export)?(((#)|((([a-z0-9\-_]+)\|)?(r)))((\d+)((#note)?-(\d+))?)|(:)([^"\s<>][^\s<>]*?|"[^"]+?"))(?=(?=[[:punct:]][^A-Za-z0-9_/])|,|\s|\]|<|$)}) do |m| |
|
745 |
tag_content, leading, esc, project_prefix, project_identifier, prefix, repo_prefix, repo_identifier, sep, identifier, comment_suffix, comment_id = $ |
|
|
745 | tag_content, leading, esc, project_prefix, project_identifier, prefix, repo_prefix, repo_identifier, sep, identifier, comment_suffix, comment_id = $2, $3, $4, $5, $6, $7, $12, $13, $10 || $14 || $20, $16 || $21, $17, $19 | |
|
746 | 746 | if tag_content |
|
747 | 747 | $& |
|
748 | 748 | else |
@@ -1263,6 +1263,13 RAW | |||
|
1263 | 1263 | end |
|
1264 | 1264 | end |
|
1265 | 1265 | |
|
1266 | def test_parse_redmine_links_should_handle_a_tag_without_attributes | |
|
1267 | text = '<a>http://example.com</a>' | |
|
1268 | expected = text.dup | |
|
1269 | parse_redmine_links(text, nil, nil, nil, true, {}) | |
|
1270 | assert_equal expected, text | |
|
1271 | end | |
|
1272 | ||
|
1266 | 1273 | def test_due_date_distance_in_words |
|
1267 | 1274 | to_test = { Date.today => 'Due in 0 days', |
|
1268 | 1275 | Date.today + 1 => 'Due in 1 day', |
General Comments 0
You need to be logged in to leave comments.
Login now