Forum: Ruby on Rails Re: Problem moving from RedCloth 3.0.3 to 3.0.4

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Jason G. (Guest)
on 2007-01-03 15:52
(Received via mailing list)
_why turned off hard breaks by default in the latest version of
RedCloth.  The option you want is :hard_breaks, but it is broken.
There was a fix applied to the trunk
( seven months
ago, but _why hasn't released it as a gem.  I've bugged him to do so,
but it would help if you all would too.  To fix it yourself, either
unpack RedCloth r128 or later into vendor/ and require it from there or
else open the class and overwrite the hard_break method.

class RedCloth
   hard_break( text )
     text.gsub!( /(.)\n(?!\n|\Z| *([#*=]+(\s|$)|[{|]))/, "\\1<br />" )
if hard_breaks

This topic is locked and can not be replied to.