@@ -764,7 +764,7 class RedCloth < String | |||
|
764 | 764 | ([\s\[{(]|[#{PUNCT}])? # $pre |
|
765 | 765 | " # start |
|
766 | 766 | (#{C}) # $atts |
|
767 |
([^"]+?) |
|
|
767 | ([^"\n]+?) # $text | |
|
768 | 768 | \s? |
|
769 | 769 | (?:\(([^)]+?)\)(?="))? # $title |
|
770 | 770 | ": |
@@ -45,7 +45,7 module Redmine | |||
|
45 | 45 | # Patch for RedCloth. Fixed in RedCloth r128 but _why hasn't released it yet. |
|
46 | 46 | # <a href="http://code.whytheluckystiff.net/redcloth/changeset/128">http://code.whytheluckystiff.net/redcloth/changeset/128</a> |
|
47 | 47 | def hard_break( text ) |
|
48 | text.gsub!( /(.)\n(?!\n|\Z| *([#*=]+(\s|$)|[{|]))/, "\\1<br />" ) if hard_breaks | |
|
48 | text.gsub!( /(.)\n(?!\n|\Z| *([#*=]+(\s|$)|[{|]))/, "\\1<br />\n" ) if hard_breaks | |
|
49 | 49 | end |
|
50 | 50 | |
|
51 | 51 | # Patch to add code highlighting support to RedCloth |
@@ -58,7 +58,9 class ApplicationHelperTest < HelperTestCase | |||
|
58 | 58 | to_test = { |
|
59 | 59 | 'This is a "link":http://foo.bar' => 'This is a <a href="http://foo.bar" class="external">link</a>', |
|
60 | 60 | 'This is an intern "link":/foo/bar' => 'This is an intern <a href="/foo/bar">link</a>', |
|
61 | '"link (Link title)":http://foo.bar' => '<a href="http://foo.bar" title="Link title" class="external">link</a>' | |
|
61 | '"link (Link title)":http://foo.bar' => '<a href="http://foo.bar" title="Link title" class="external">link</a>', | |
|
62 | # no multiline link text | |
|
63 | "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" | |
|
62 | 64 | } |
|
63 | 65 | to_test.each { |text, result| assert_equal "<p>#{result}</p>", textilizable(text) } |
|
64 | 66 | end |
General Comments 0
You need to be logged in to leave comments.
Login now