Re: Problem moving from RedCloth 3.0.3 to 3.0.4


#1

_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
(http://code.whytheluckystiff.net/redcloth/changeset/128) 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
” )
if hard_breaks
end
end

Jason