@@ -94,7 +94,7 module Redmine | |||
|
94 | 94 | module LinksHelper |
|
95 | 95 | AUTO_LINK_RE = %r{ |
|
96 | 96 | ( # leading text |
|
97 |
<\w+ |
|
|
97 | <\w+[^>]*?>| # leading HTML tag, or | |
|
98 | 98 | [\s\(\[,;]| # leading punctuation, or |
|
99 | 99 | ^ # beginning of line |
|
100 | 100 | ) |
@@ -48,6 +48,19 EXPECTED | |||
|
48 | 48 | assert_equal expected.gsub(%r{[\r\n\t]}, ''), Redmine::WikiFormatting::NullFormatter::Formatter.new(raw).to_html.gsub(%r{[\r\n\t]}, '') |
|
49 | 49 | end |
|
50 | 50 | |
|
51 | def test_links_separated_with_line_break_should_link | |
|
52 | raw = <<-DIFF | |
|
53 | link: https://www.redmine.org | |
|
54 | http://www.redmine.org | |
|
55 | DIFF | |
|
56 | ||
|
57 | expected = <<-EXPECTED | |
|
58 | <p>link: <a class="external" href="https://www.redmine.org">https://www.redmine.org</a><br /> | |
|
59 | <a class="external" href="http://www.redmine.org">http://www.redmine.org</a></p> | |
|
60 | EXPECTED | |
|
61 | ||
|
62 | end | |
|
63 | ||
|
51 | 64 | def test_supports_section_edit |
|
52 | 65 | with_settings :text_formatting => 'textile' do |
|
53 | 66 | assert_equal true, Redmine::WikiFormatting.supports_section_edit? |
General Comments 0
You need to be logged in to leave comments.
Login now