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.
Joe (Guest)
on 2006-03-07 02: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
Michael G. (Guest)
on 2006-03-07 04: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.
Berin L. (Guest)
on 2006-03-07 04: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.
Jeff B. (Guest)
on 2006-03-07 18: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.
D. Taylor S. (Guest)
on 2006-03-07 18: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!
Joe (Guest)
on 2006-03-08 21: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
Tom L. (Guest)
on 2006-03-25 06:32
(Received via mailing list)
On 3/7/06, D. Taylor S. <removed_email_address@domain.invalid> 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 L.
http://AllTom.com/
http://GadgetLife.org/
This topic is locked and can not be replied to.