Forum: Ruby on Rails Anybody use Red|Blue Cloth?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
429500a5a54600958c9c7ac032a37f66?d=identicon&s=25 Joe (Guest)
on 2006-03-07 01:30
Does anybody use and prefer Redcloth (or bluecloth, which appears to be
alpha)? Does it affect performance much? Is there a way to get it to
automatically process templates without having to call textilize?

Thanks,
Joe
2c80e1b0837eec76d38d4f7fa1c15e87?d=identicon&s=25 Michael Gorsuch (Guest)
on 2006-03-07 03:02
(Received via mailing list)
Joe - I use redcloth all the time for my projects.  It gives my users
and easy way to mark up my documents / comments (my site, AreYouHiring
http://www.areyouhiring.com) without having to worry about HTML.  In
fact, it seems safer - I can filter out pure html from the content by
using "h", and then render what's left via RedCloth.

I don't see performance issues yet, but I plan to implement caching to
cover that.

I simple do something like this in a helper:

RedCloth.new(body).to_html to render my text.
Hope this helps somewhat.
C941170ba5ca038b89b8407c83fb23c2?d=identicon&s=25 Berin Loritsch (Guest)
on 2006-03-07 03:44
(Received via mailing list)
Joe wrote:
> Does anybody use and prefer Redcloth (or bluecloth, which appears to be
> alpha)? Does it affect performance much? Is there a way to get it to
> automatically process templates without having to call textilize?
>

I use RedCloth--which is more flexible.  Overhead is negligible.  As to
auto formatting, not really--unless you want to store the processed
version of your text in the database.
7572157852143be53747b2d08784cb6f?d=identicon&s=25 Jeff Barczewski (Guest)
on 2006-03-07 17:06
(Received via mailing list)
I like Bluecloth myself simply because I prefer the Markdown syntax. I
have
been using it as part of Typo and it works well, I have not encountered
any
issues thus far.
09ff21c336ae126e8b3199f8b64d7796?d=identicon&s=25 D. Taylor Singletary (Guest)
on 2006-03-07 17:22
(Received via mailing list)
Tangent to this topic -- has anyone found a good pattern to using
truncate
and textilize together? Perhaps have written a
smart_truncate_and_textilize
helper? Calling truncate after the textilize leaves the possibility of
unclosed or interrupted HTML tags, running truncate prior to textilize
can
result in textile markup being rendered.

Thanks!
429500a5a54600958c9c7ac032a37f66?d=identicon&s=25 Joe (Guest)
on 2006-03-08 20:57
Is there a way to use RedCloth in a controller? I can get it to work
fine in views. Something like:

  def view
    RedCloth.new(response).to_html
  end


Joe
7a28bf7b0932a9486c21f1a33eb431ba?d=identicon&s=25 Tom Lieber (Guest)
on 2006-03-25 05:32
(Received via mailing list)
On 3/7/06, D. Taylor Singletary <taylorsingletary@gmail.com> wrote:
> Tangent to this topic -- has anyone found a good pattern to using truncate
> and textilize together? Perhaps have written a smart_truncate_and_textilize
> helper? Calling truncate after the textilize leaves the possibility of
> unclosed or interrupted HTML tags, running truncate prior to textilize can
> result in textile markup being rendered.
>
> Thanks!

I use close_open_html(truncate(markdown(the_text), 200)) with the
close_open_html routine found here:
<http://blog.ideoplex.com/2005/03/17.html>. I renamed "sanitize" to
"close_open_html" because I thought that it was more descriptive.

Sincerely,

Tom Lieber
http://AllTom.com/
http://GadgetLife.org/
This topic is locked and can not be replied to.