Defect #9377 ยป wiki_br_insertion_patch.diff
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 |