##// END OF EJS Templates
Fixed: line breaks are ignored in quoted text (#6148)....
Jean-Philippe Lang -
r5013:6f5ffce79939
parent child
Show More
@@ -296,11 +296,11 class RedCloth3 < String
296 rip_offtags text
296 rip_offtags text
297 no_textile text
297 no_textile text
298 escape_html_tags text
298 escape_html_tags text
299 # need to do this before #hard_break and #blocks
300 block_textile_quotes text unless @lite_mode
299 hard_break text
301 hard_break text
300 unless @lite_mode
302 unless @lite_mode
301 refs text
303 refs text
302 # need to do this before text is split by #blocks
303 block_textile_quotes text
304 blocks text
304 blocks text
305 end
305 end
306 inline text
306 inline text
@@ -43,7 +43,7 module Redmine
43 # Patch for RedCloth. Fixed in RedCloth r128 but _why hasn't released it yet.
43 # Patch for RedCloth. Fixed in RedCloth r128 but _why hasn't released it yet.
44 # <a href="http://code.whytheluckystiff.net/redcloth/changeset/128">http://code.whytheluckystiff.net/redcloth/changeset/128</a>
44 # <a href="http://code.whytheluckystiff.net/redcloth/changeset/128">http://code.whytheluckystiff.net/redcloth/changeset/128</a>
45 def hard_break( text )
45 def hard_break( text )
46 text.gsub!( /(.)\n(?!\n|\Z|>| *([#*=]+(\s|$)|[{|]))/, "\\1<br />" ) if hard_breaks
46 text.gsub!( /(.)\n(?!\n|\Z| *([#*=]+(\s|$)|[{|]))/, "\\1<br />" ) if hard_breaks
47 end
47 end
48
48
49 # Patch to add code highlighting support to RedCloth
49 # Patch to add code highlighting support to RedCloth
@@ -113,7 +113,7 RAW
113 expected = <<-EXPECTED
113 expected = <<-EXPECTED
114 <p>John said:</p>
114 <p>John said:</p>
115 <blockquote>
115 <blockquote>
116 Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas sed libero.
116 Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas sed libero.<br />
117 Nullam commodo metus accumsan nulla. Curabitur lobortis dui id dolor.
117 Nullam commodo metus accumsan nulla. Curabitur lobortis dui id dolor.
118 <ul>
118 <ul>
119 <li>Donec odio lorem,</li>
119 <li>Donec odio lorem,</li>
General Comments 0
You need to be logged in to leave comments. Login now