I guess for the short term it would be best to use textilize because it handles 
hard breaks better, right?

Reinier

> -----Oorspronkelijk bericht-----
> Van: Walter Cruz [mailto:[EMAIL PROTECTED]
> Verzonden: vrijdag 13 juni 2008 19:35
> Aan: Eric Allen
> CC: Reinier Balt; [email protected]
> Onderwerp: Re: [Tracks-discuss] textile() vs. markdown()
> 
> Hi Eric!
> 
> In the Brazilian Rails Podcast, the guys speak about two newer and
> faster alternatives to RedCloth.
> 
> Maybe it could be worth a look :)
> 
> http://tomayko.com/writings/ruby-markdown-libraries-real-cheap-for-you-
> two-for-price-of-one
> 
> []'s
> - Walter
> 
> On Fri, Jun 13, 2008 at 1:58 PM, Eric Allen <[EMAIL PROTECTED]>
> wrote:
> > Thomas & Walter: They both handle both Markdown and Textile because
> > RedCloth parses both. There will be zero impact on user experience.
> >
> > Reiner: the only difference appears to be hard breaks:
> >
> > def markdown(text)
> >   RedCloth.new(text).to_html
> > end
> >
> > def textilize(text)
> >   if text.blank?
> >     ""
> >   else
> >     textilized = RedCloth.new(text, [ :hard_breaks ])
> >     textilized.hard_breaks = true if textilized.respond_to?
> > ("hard_breaks=")
> >     textilized.to_html
> >   end
> > end
> >
> > :hard_breaks means one newline is a <br/> and two makes a paragraph
> >
> >
> > On Jun 13, 2008, at 1:56 AM, Reinier Balt wrote:
> >
> >> It does make sense to keep everything consistent. Is there much
> >> difference between markdown and textilize, besides textilize being a
> >> built-in Rails helper?
> >>
> >> Reinier
> >>
> >> Van: [EMAIL PROTECTED] [mailto:tracks-
> [EMAIL PROTECTED]
> >> ]Namens Eric Allen
> >> Verzonden: vrijdag 13 juni 2008 3:32
> >> Aan: [email protected]
> >> Onderwerp: [Tracks-discuss] textile() vs. markdown()
> >>
> >> I was looking through commit #876 today and noticed that in some
> >> places we use markdown() to invoke RedCloth, and in others we use
> >> textilize(). Does it make sense to keep everything consistent? If
> >> so, it seems to me textilize() would be better, since it's a built-
> >> in Rails helper.
> >
> > _______________________________________________
> > Tracks-discuss mailing list
> > [email protected]
> > http://lists.rousette.org.uk/mailman/listinfo/tracks-discuss
> >

_______________________________________________
Tracks-discuss mailing list
[email protected]
http://lists.rousette.org.uk/mailman/listinfo/tracks-discuss

Reply via email to