Project

General

Profile

Defect #9377 ยป wiki_br_insertion_patch.diff

A patch to solve this issue. - Masamitsu Murase, 2011-10-06 18:47

View differences:

lib/redmine/wiki_formatting/textile/formatter.rb (working copy)
43 43
        # Patch for RedCloth.  Fixed in RedCloth r128 but _why hasn't released it yet.
44 44
        # <a href="http://code.whytheluckystiff.net/redcloth/changeset/128">http://code.whytheluckystiff.net/redcloth/changeset/128</a>
45 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 47
        end
48 48
        
49 49
        # Patch to add code highlighting support to RedCloth
    (1-1/1)