]> source.dussan.org Git - redmine.git/commitdiff
Fixed: line breaks are ignored in quoted text (#6148).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Mon, 14 Mar 2011 20:35:36 +0000 (20:35 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Mon, 14 Mar 2011 20:35:36 +0000 (20:35 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5133 e93f8b46-1217-0410-a6f0-8f06a7374b81

lib/redcloth3.rb
lib/redmine/wiki_formatting/textile/formatter.rb
test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb

index 848aa7042a84bf50966883e01824eb202b620096..f4c6244373fd56376a197c3618fc0887d5ed8b61 100644 (file)
@@ -296,11 +296,11 @@ class RedCloth3 < String
         rip_offtags text
         no_textile text
         escape_html_tags text
+        # need to do this before #hard_break and #blocks
+        block_textile_quotes text unless @lite_mode
         hard_break text 
         unless @lite_mode
             refs text
-            # need to do this before text is split by #blocks
-            block_textile_quotes text
             blocks text
         end
         inline text
index 88d52a6c2673231b155026ac82c16543cf4be2a5..a32e648ec147e239ed828c25710fa0cdd6f6f5a4 100644 (file)
@@ -43,7 +43,7 @@ module Redmine
         # Patch for RedCloth.  Fixed in RedCloth r128 but _why hasn't released it yet.
         # <a href="http://code.whytheluckystiff.net/redcloth/changeset/128">http://code.whytheluckystiff.net/redcloth/changeset/128</a>
         def hard_break( text ) 
-          text.gsub!( /(.)\n(?!\n|\Z|>| *([#*=]+(\s|$)|[{|]))/, "\\1<br />" ) if hard_breaks
+          text.gsub!( /(.)\n(?!\n|\Z| *([#*=]+(\s|$)|[{|]))/, "\\1<br />" ) if hard_breaks
         end
         
         # Patch to add code highlighting support to RedCloth
index a221b6c8d3799384fee0a2049e1868e323339910..fa5f8adb4ae0635c30cda15530db1de09b7f0537 100644 (file)
@@ -113,7 +113,7 @@ RAW
     expected = <<-EXPECTED
 <p>John said:</p>
 <blockquote>
-Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas sed libero.
+Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas sed libero.<br />
 Nullam commodo metus accumsan nulla. Curabitur lobortis dui id dolor.
 <ul>
   <li>Donec odio lorem,</li>