dorian mcfarland wrote:
Hi, I’m having some problems with redcloth(3.0.4 gem) and textilize.
I have a string:
which is being textilized as:
so no paragraph and h2 wrapped all the way.
the input is coming from firefox 1.5.2 on a mac
Anybody got any idea what the problem might be?
I do things for love or money
I have had similar issues. It seems to come down to the :hard_breaks
option, which is enabled by default. I had to add a hlper method called
textilize to application_helper.rb that overrides the default behavior.
def textilize(text, options = nil)
textilized = (options ? RedCloth.new(text, options) :
That should make textilize work as expected, and allows you to pass in
your option to the RedCloth object.
However single line breaks will not produce a
. If anyone knows
how to make textile work so “\n” is a
and “\n\n” does paragraphs
I would be quite interested to know.