comparison lib/redmine/wiki_formatting/textile/formatter.rb @ 511:107d36338b70 live

Merge from branch "cannam"
author Chris Cannam
date Thu, 14 Jul 2011 10:43:07 +0100
parents cbce1fd3b1b7
children cbb26bc654de
comparison
equal deleted inserted replaced
451:a9f6345cb43d 511:107d36338b70
41 private 41 private
42 42
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
50 def smooth_offtags( text ) 50 def smooth_offtags( text )
51 unless @pre_list.empty? 51 unless @pre_list.empty?