Forum: Redcloth hard_breaks issues

Posted by Jean-Baptiste BARTH (Guest)
on 2008-05-13 23:00
(Received via mailing list)
Hello,

I'm new to this list, so first of all, many thanks to RedCloth's
developers, it really helps me in many ruby apps :-)

I post here because I'd like to have a clear view on "hard_breaks"
related issues. I saw old references on the web and on the archives on
this ML, I'd like a fresh view !
It seems that RedCloth 3.0.4 does not handle "\n" as my previous
reference (here : http://textism.com/tools/textile/index.php). Actually,
"hobix.com" website (quoted in the redcloth doc) differs on the "<br>"
point. So first, can you confirm which is the real reference for the
Textile "language", and what spec Redcloth follow ?

The latest stable release does everything well for me except "\n" =>
"<br />", it leaves "\n" as is.
I use a very basic code : @blah = RedCloth.new(text_to_parse).to_html
I tried to add the array [:hard_breaks] as a second parameter, but not
only it does not parse \n "well" (see below), but other features
disappear, except bold, underline, links and some other transformations.
Maybe it's the standard behaviour, but in that case, I think I don't
really understand the second parameter usage...

When I say "does not parse \n well", I mean :
- the sample given on the link above is visually parsed the same way,
except the "That was a line break" paragraph and some tabulations in
pre/code sections
- I tried "test\nblah\nbleh" on both, original textile result is
"\t<p>test<br />\nblah<br />\nbleh</p>" while RedCloth 3.0.4 result is
"<p>test\nblah\nbleh</p>"

Here are the questions :
- is this behaviour normal (according to developper point of view /
principles) ?
- if not, is it corrected on dev version, or about to be (I saw the name
"SuperRedCloth" ??) ? and how to test it ?
- would you be interested in a patch that make redcloth 3.0.4 behaviour
similar to textile php implementation, or it is to be outdated ? I've
one, strongly inspired from the php class by Alex Shiels. I think it
works well, but I'm a ruby beginner, the code may be ugly.. Moreover, it
appears that it is not affected by bug #36 (seen on
https://code.whytheluckystiff.net/redcloth/, if it is up to date)

Thank you,

Cheers,

--
Jean-Baptiste BARTH
Posted by Jason Garber (Guest)
on 2008-05-20 17:17
(Received via mailing list)
This issue will very soon be corrected with the release of RedCloth
4.0 (was the SuperRedCloth branch).  We've kicked around the idea of
releasing a patched version of 3.x simultaneously, but I'm not
planning to spend any time on it, so I doubt it will happen.  I'm
afraid it would just complicate things unnecessarily.

I'm back from my honeymoon, so I hope we can get some final issues
worked out and release 4.0 soon.

Thanks!
Jason
Posted by Jean-Baptiste Barth (Guest)
on 2008-05-21 10:30
(Received via mailing list)
Ok thanks, I understand your position.
Actually I took a look at the upcoming version and it looks like it 
resolves
the great majority of the bugs I found in version 3.0.4...
Hope the final version will be released soon ;-)

--
Jean-Baptiste

2008/5/20 Jason Garber <jg@jasongarber.com>:
Posted by _why (Guest)
on 2008-05-22 18:17
(Received via mailing list)
On Tue, May 20, 2008 at 11:16:49AM -0400, Jason Garber wrote:
> I'm back from my honeymoon, so I hope we can get some final issues worked 
> out and release 4.0 soon.

Oh, hey, welcome back, Jason.  I'm busy with a Shoes release for the
next week, but after that I can concentrate on getting the RedCloth
release all smoothed out with you.  It looks like all the tickets
left in Trac were all RedCloth 3?

_why
Posted by Jason Garber (Guest)
on 2008-05-23 16:59
(Received via mailing list)
Not all the tickets in Trac are RedCloth 3.  There are some marked
SUPER: http://code.whytheluckystiff.net/redcloth/report/2

I'm stumped on #50, 54 and 55.  Could you try to fix them?

Jason
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.