Thomas Counsell wrote:

> I've been wondering whether RedCloth is being stretched in too many 
> directions?
>
> On the one hand the use of gsubs! and big old regexps makes Redcloth 
> very powerful and great for clever textile commands for writing 
> beautiful books like _why's, but on the other they are really hard to 
> get right for the 'big pages, but mostly trivial markup' of wikis.

Yeah, totally.  But I think I just need more tests.

In the examples given by Alexey, RedCloth is given IRC logs.  My tests 
have been limited to text that can be split into paragraphs.

IRC logs should probably be surrounded with <notextile> .. </notextile>.

> I had a go at re-implementing textile to html conversion as a left to 
> right parser using the Strscan library (code below or at 
> http://www2.eng.cam.ac.uk/~tamc2/TextileParser.rb).  This, I think, 
> manages the conversions mentioned in http://hobix.com/textile/ and 
> doesn't stack overflow on big pages, but does not do all the amazing 
> extra stuff that RedCloth actually does.   The downside, and the 
> reason I haven't pursued it is that not only does it do less, it is 
> also much much slower (should have been obvious in advance I guess).

Hey, that's cool!  I'm going to play with this.

I've been tinkering with making a C version (SuperRedCloth) as well, 
using a similar technique.  I could really use some extra speed.

> PS The tabs and spaces, and the order of the attribute values in html, 
> are different in TextileParser compared to Redcloth, so lots of the 
> Redcloth tests fail on this even though they have the same syntactic 
> meaning, others fail because TextileParser doesn't implement beyond 
> http://hobix.com/textile/, and others just fail of course.

Go ahead and eliminate extra newlines and leading tabs when you're 
testing.  It's not worthwhile to count out all the newlines in your output.

_why