@@ -86,7 +86,7 module Redmine | |||||
86 | AUTO_LINK_RE = %r{ |
|
86 | AUTO_LINK_RE = %r{ | |
87 | ( # leading text |
|
87 | ( # leading text | |
88 | <\w+.*?>| # leading HTML tag, or |
|
88 | <\w+.*?>| # leading HTML tag, or | |
89 |
[ |
|
89 | [\s\(\[,;]| # leading punctuation, or | |
90 | ^ # beginning of line |
|
90 | ^ # beginning of line | |
91 | ) |
|
91 | ) | |
92 | ( |
|
92 | ( |
@@ -88,6 +88,7 class ApplicationHelperTest < ActionView::TestCase | |||||
88 | # invalid urls |
|
88 | # invalid urls | |
89 | 'http://' => 'http://', |
|
89 | 'http://' => 'http://', | |
90 | 'www.' => 'www.', |
|
90 | 'www.' => 'www.', | |
|
91 | 'test-www.bar.com' => 'test-www.bar.com', | |||
91 | } |
|
92 | } | |
92 | to_test.each { |text, result| assert_equal "<p>#{result}</p>", textilizable(text) } |
|
93 | to_test.each { |text, result| assert_equal "<p>#{result}</p>", textilizable(text) } | |
93 | end |
|
94 | end | |
@@ -104,8 +105,11 class ApplicationHelperTest < ActionView::TestCase | |||||
104 | end |
|
105 | end | |
105 |
|
106 | |||
106 | def test_auto_mailto |
|
107 | def test_auto_mailto | |
107 | assert_equal '<p><a class="email" href="mailto:test@foo.bar">test@foo.bar</a></p>', |
|
108 | to_test = { | |
108 | textilizable('test@foo.bar') |
|
109 | 'test@foo.bar' => '<a class="email" href="mailto:test@foo.bar">test@foo.bar</a>', | |
|
110 | 'test@www.foo.bar' => '<a class="email" href="mailto:test@www.foo.bar">test@www.foo.bar</a>', | |||
|
111 | } | |||
|
112 | to_test.each { |text, result| assert_equal "<p>#{result}</p>", textilizable(text) } | |||
109 | end |
|
113 | end | |
110 |
|
114 | |||
111 | def test_inline_images |
|
115 | def test_inline_images |
General Comments 0
You need to be logged in to leave comments.
Login now