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)
# 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
    (1-1/1)