Hi all, I am facing the following problem (while writing the RForum, an open-source Rails BBS application): 1. Want to use some form of simplified markup (like Textile or Markdown) 2. Want to handle quoting beautifully (so, we need to recognize multiple nested quoting levels, automatically wrap quoted lines, etc). The problem is that (unless I am missing something) neither Textile nor Markdown address the problem of multi-level quoting. bbCode does, but we kind of agreed with Andreas (the author of the initial RForum code) that we aren''t building a phpBB clone :) Any suggestions where to look at? Best regards, Alex
Alexey Verkhovsky wrote:> Hi all, > > I am facing the following problem (while writing the RForum, an > open-source Rails BBS application): > > 1. Want to use some form of simplified markup (like Textile or Markdown) > > 2. Want to handle quoting beautifully (so, we need to recognize multiple > nested quoting levels, automatically wrap quoted lines, etc). > > The problem is that (unless I am missing something) neither Textile nor > Markdown address the problem of multi-level quoting.Yes, Markdown does. [1] Simply use the common e-mail style of nested quotes. ">>" [1]: http://daringfireball.net/projects/markdown/syntax#blockquote You could probably easily add the same handling to RedCloth for textile(variant) users. -- Marten Veldthuis
On Sat, 2004-10-30 at 01:35, Marten Veldthuis wrote:> Yes, Markdown does. [1] Simply use the common e-mail style of nested > quotes. ">>"That''s nice - exactly what I was looking for (and it was staring me in the face)! Thank you. Alex
> Yes, Markdown does. [1] Simply use the common e-mail style of nested > quotes. ">>"On that note, I should mention that Rails 0.8.1 will ship with a TextHelper method called "markdown" that does exactly the same as "textilize" if BlueCloth is installed. I''m using Markdown for the next application I''m working on with 37signals. -- David Heinemeier Hansson, http://www.basecamphq.com/ -- Web-based Project Management http://www.rubyonrails.org/ -- Web-application framework for Ruby http://macromates.com/ -- TextMate: Code and markup editor (OS X) http://www.loudthinking.com/ -- Broadcasting Brain
Why if i may ask ? On Sat, 30 Oct 2004 01:06:37 +0200, David Heinemeier Hansson <david-OiTZALl8rpK0mm7Ywyx6yg@public.gmane.org> wrote:> > Yes, Markdown does. [1] Simply use the common e-mail style of nested > > quotes. ">>" > > On that note, I should mention that Rails 0.8.1 will ship with a > TextHelper method called "markdown" that does exactly the same as > "textilize" if BlueCloth is installed. > > I''m using Markdown for the next application I''m working on with > 37signals. > -- > David Heinemeier Hansson, > http://www.basecamphq.com/ -- Web-based Project Management > http://www.rubyonrails.org/ -- Web-application framework for Ruby > http://macromates.com/ -- TextMate: Code and markup editor (OS X) > http://www.loudthinking.com/ -- Broadcasting Brain > > > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- Tobi
Tobias Luetke wrote:>On Sat, 30 Oct 2004 01:06:37 +0200, David Heinemeier Hansson ><david-OiTZALl8rpK0mm7Ywyx6yg@public.gmane.org> wrote: >>On that note, I should mention that Rails 0.8.1 will ship with a >>TextHelper method called "markdown" that does exactly the same as >>"textilize" if BlueCloth is installed. >> >>I''m using Markdown for the next application I''m working on with >>37signals.> >Why if i may ask ? On the first part, I think consistency is the key. Although I agree to some degree that it really should end here with these kind of wrappers which make it into Rails. At all cost I feel we should avoid making the kitchen-sink thing called PHP out of Railties. On the second part, well David has given zero information about this, other than that it''s going to be the 37NextBigThing, so I''m only guessing here. But I suspect it''s because of the same reason I like Markdown; the fact that the syntax is created so that the plain text is better readable than Textile text. -- Marten Veldthuis
I see your point, but I think there still needs to be some sort of place where people can contribute their add-ons and plug-ins. Maybe it shouldn''t be in the main code base, but there should be a way for people to share their improvements with each other. On Sat, 30 Oct 2004 02:00:11 +0200, Marten Veldthuis <marten-bhBtkFhEHeMTIWBel16Y73nhMCiq3JZZ@public.gmane.org> wrote:> On the first part, I think consistency is the key. Although I agree to > some degree that it really should end here with these kind of wrappers > which make it into Rails. At all cost I feel we should avoid making the > kitchen-sink thing called PHP out of Railties.
> I see your point, but I think there still needs to be some sort of > place where people can contribute their add-ons and plug-ins. Maybe > it shouldn''t be in the main code base, but there should be a way for > people to share their improvements with each other.I''m as vigilant as anyone about keeping Rails free of cruft. So every case is judged with much scrutiny. Markdown got it as it''s a nice and almost equally popular alternative to Textile. Because it''s available as a gem for easy installs. And because it required so little programming. And because it sits in a helper, not a core part of the framework like Base or other where. -- David Heinemeier Hansson, http://www.basecamphq.com/ -- Web-based Project Management http://www.rubyonrails.org/ -- Web-application framework for Ruby http://macromates.com/ -- TextMate: Code and markup editor (OS X) http://www.loudthinking.com/ -- Broadcasting Brain
Marten Veldthuis wrote:> Alexey Verkhovsky wrote: > >> Hi all, >> >> I am facing the following problem (while writing the RForum, an >> open-source Rails BBS application): >> >> 1. Want to use some form of simplified markup (like Textile or Markdown) >> >> 2. Want to handle quoting beautifully (so, we need to recognize multiple >> nested quoting levels, automatically wrap quoted lines, etc). >> >> The problem is that (unless I am missing something) neither Textile nor >> Markdown address the problem of multi-level quoting. > > > Yes, Markdown does. [1] Simply use the common e-mail style of nested > quotes. ">>"Unfortunately BlueCloth is unusable slow. I have a topic with 15 posts, half of them have up to 6 quoting levels. The page takes 5s (five seconds!) to load on my Powerbook 1.33 GHz.
> Unfortunately BlueCloth is unusable slow. I have a topic with 15 > posts, half of them have up to 6 quoting levels. The page takes 5s > (five seconds!) to load on my Powerbook 1.33 GHz.Textile can be rather slow too. My approach have been to cache the rendering when the new object is saved in a separate database field. -- David Heinemeier Hansson, http://www.basecamphq.com/ -- Web-based Project Management http://www.rubyonrails.org/ -- Web-application framework for Ruby http://macromates.com/ -- TextMate: Code and markup editor (OS X) http://www.loudthinking.com/ -- Broadcasting Brain
Same here : def before_save self.formatted_body = textile self.body self.formatted_intro = textile self.intro end On Sat, 30 Oct 2004 11:30:29 +0200, David Heinemeier Hansson <david-OiTZALl8rpK0mm7Ywyx6yg@public.gmane.org> wrote:> > Unfortunately BlueCloth is unusable slow. I have a topic with 15 > > posts, half of them have up to 6 quoting levels. The page takes 5s > > (five seconds!) to load on my Powerbook 1.33 GHz. > > Textile can be rather slow too. My approach have been to cache the > rendering when the new object is saved in a separate database field. > > > -- > David Heinemeier Hansson, > http://www.basecamphq.com/ -- Web-based Project Management > http://www.rubyonrails.org/ -- Web-application framework for Ruby > http://macromates.com/ -- TextMate: Code and markup editor (OS X) > http://www.loudthinking.com/ -- Broadcasting Brain > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- Tobi
Hi, I''ve brought recreate_db.rb to the point where I can flip database from SQLite to Postgres and back in under a minute. All our unit tests pass on Postgres but no less than 6 (anything that relies on database constraints, for example) fail. Alex