@@ -907,7 +907,7 class RedCloth3 < String | |||||
907 | end |
|
907 | end | |
908 |
|
908 | |||
909 | IMAGE_RE = / |
|
909 | IMAGE_RE = / | |
910 |
(<p>| |
|
910 | (<p>|\s|^) # start of line? | |
911 | \! # opening |
|
911 | \! # opening | |
912 | (\<|\=|\>)? # optional alignment atts |
|
912 | (\<|\=|\>)? # optional alignment atts | |
913 | (#{C}) # optional style,class atts |
|
913 | (#{C}) # optional style,class atts |
@@ -57,6 +57,8 class ApplicationHelperTest < HelperTestCase | |||||
57 | 'ftp://foo.bar' => '<a class="external" href="ftp://foo.bar">ftp://foo.bar</a>', |
|
57 | 'ftp://foo.bar' => '<a class="external" href="ftp://foo.bar">ftp://foo.bar</a>', | |
58 | 'ftps://foo.bar' => '<a class="external" href="ftps://foo.bar">ftps://foo.bar</a>', |
|
58 | 'ftps://foo.bar' => '<a class="external" href="ftps://foo.bar">ftps://foo.bar</a>', | |
59 | 'sftp://foo.bar' => '<a class="external" href="sftp://foo.bar">sftp://foo.bar</a>', |
|
59 | 'sftp://foo.bar' => '<a class="external" href="sftp://foo.bar">sftp://foo.bar</a>', | |
|
60 | # two exclamation marks | |||
|
61 | 'http://example.net/path!602815048C7B5C20!302.html' => '<a class="external" href="http://example.net/path!602815048C7B5C20!302.html">http://example.net/path!602815048C7B5C20!302.html</a>', | |||
60 | } |
|
62 | } | |
61 | to_test.each { |text, result| assert_equal "<p>#{result}</p>", textilizable(text) } |
|
63 | to_test.each { |text, result| assert_equal "<p>#{result}</p>", textilizable(text) } | |
62 | end |
|
64 | end | |
@@ -110,6 +112,8 class ApplicationHelperTest < HelperTestCase | |||||
110 | "This is a double quote \"on the first line\nand another on a second line\":test" => "This is a double quote \"on the first line<br />\nand another on a second line\":test", |
|
112 | "This is a double quote \"on the first line\nand another on a second line\":test" => "This is a double quote \"on the first line<br />\nand another on a second line\":test", | |
111 | # mailto link |
|
113 | # mailto link | |
112 | "\"system administrator\":mailto:sysadmin@example.com?subject=redmine%20permissions" => "<a href=\"mailto:sysadmin@example.com?subject=redmine%20permissions\">system administrator</a>", |
|
114 | "\"system administrator\":mailto:sysadmin@example.com?subject=redmine%20permissions" => "<a href=\"mailto:sysadmin@example.com?subject=redmine%20permissions\">system administrator</a>", | |
|
115 | # two exclamation marks | |||
|
116 | '"a link":http://example.net/path!602815048C7B5C20!302.html' => '<a href="http://example.net/path!602815048C7B5C20!302.html" class="external">a link</a>', | |||
113 | } |
|
117 | } | |
114 | to_test.each { |text, result| assert_equal "<p>#{result}</p>", textilizable(text) } |
|
118 | to_test.each { |text, result| assert_equal "<p>#{result}</p>", textilizable(text) } | |
115 | end |
|
119 | end |
General Comments 0
You need to be logged in to leave comments.
Login now