hoodwink.d enhanced
RSS
2.0
XHTML
1.0

RedHanded

SuperRedCloth #

by why in inspect

I’m sick of RedCloth being my most nauseating library!! All those treacherous regexps…

 $ svn co http://code.whytheluckystiff.net/svn/redcloth/branches/superredcloth
 $ cd superredcloth
 $ rake

You’ll need the latest ragel installed. This will be ten times faster.

said on

Is That A bird? Is That a Fox? No! it’s h1.SuperRedCloth!

said on

Rake install :(

said on

Yeah! I gotta say… this kind of blows my mind! It really gets right to the point.

said on

If it solves at least a half of original RedCloth’s problems, it’s good enough for me :)

It’s like my every new project uses RedCloth now (which shows my addiction to textile formatting).

btw: .gem maybe?

said on

Nicely done, and a great Ragel tutorial …

said on

Where to send bug reports? Your test_blocks() test is invalid. Three things:

  • incorrect \n in h1 tag
  • incorrect \n in first p tag
  • redhanded.gif image is not linked as it should (:/test2)
said on

Things I hate about RedCloth:

  • notextile does not really work!!
  • hard_breaks does not really work!!
  • The span that goes around CAPS words.
  • The bad handling of dashes—sometimes you get strikethroughs.
  • No recursion. You should be able to quote a section of RedCloth and the entire blockquote should be formatted nice.
  • the ‘x’ dimension character should be strict: digit space 'x' space digit. I don’t really like it in the first place, though. Like: 42” x 36” doesn’t work. So what’s the point?
  • Underscores and dashes in URIs should be ignored.

Bug reports. (Use your Rubyforge account and assign to version SUPER .)

said on

Hot Damn! Thanks.

said on

Ah, thank heavens. This is the way it should be done!

said on

Cuack! That’s great man :) Thanks

said on

Cool stuff _why.

May end up doing something with this in Ruport soon :)

said on

Ragel looks good. As I took Theory of Computation, I wished so hard for something exactly like it.

said on

Chapter ATE !!! Chapter ATE !!

said on

My prayers have been heard! There must be a backdoor in the MouseHole…

said on

I’ve been thinking writing a Textile lib with a real parser for ages. Damn you why! You win this time!

said on

Faster AND prettier AND more ~5x more concise… 1808 LOC vs. 326 (ish)

said on

How do I pass in :hard_breaks, etc… ie:

RedCloth.new( text, [:hard_breaks] ).to_html( :textile )

said on

No recursion. You should be able to quote a section of RedCloth and the entire blockquote should be formatted nice.

This is consistently my biggest gripe with these human-friendly-markup things. It seems that you want a simple context-free language; I recommend looking at Lemon It’s not quite as powerful as Bison but it has advantages (cleaner syntax, reentrant, etc.) OTOH , ragel+recursion should at least work.

said on

Is there a Packrat parser in Ruby btw?

said on

TonyYayo: None of that is done yet. I’m working on lists and tables right now.

NikolasCo: I started using Lemon for this, actually, but it felt like too much. Textile isn’t begging to be broken up into tokens and structs. It just needs to be transformed.

I think bison is reentrant, but yacc isn’t. I’ve always really liked yacc/bison syntax actually, even though it was painful to learn because shift-reduce wasn’t explained very well when I first started using it some time ago.

Anyway, if anyone out there wants to learn Lemon, check out the lighttpd source. The configparser.y illustrates perfectly.

said on

USING ALL MY RAM ! DAMN YOU _WHY!!!

Is it normal for it to use 800M of memory during rake?

said on

OK – found the problem. DO NOT UNDER ANY CIRCUMSTANCES USE THE DEBAIN APT -INSTALLABLE RAGEL !

Compile 5.16 for yourself.

said on

199 tests, 199 assertions, 58 failures, 0 errors rake aborted!

:( Debug time.

said on

Slow down there. It’s using the tests from RedCloth 3. And I haven’t even finished with lists or tables yet. Most other things are perfect and some whitespace in the tests doesn’t match up.

Yes, don’t use anything less than Ragel 5.16!

said on

Links oh the links, why do they fail me!

Probably because I used an ‘&’ in the text for the link!

the word definition in superredcloth_inline.rl:92 needs to be adjusted to accept various punctuation characters.

said on

Boom. No worky.

said on

ehird: this patch should fix it

said on

tilman: doesn’t apply

said on

Sure it does, just tested it again.

said on

well… doesn’t here.

said on

Hank o`o: Could you tell me which older version of Ragel that was?

said on

ehird: tried running “patch -p0 -i thepatch.diff” from the checked out directory?

said on

AdrianThursto: apt-cache show ragel: Version: 5.7-1

OLDDDD …

said on

odd, i was doing that, but now it works :/

it’s fast.

said on

er. how did that happen.

said on

er. how did that happen.

said on

Hanko `o: thanks!

said on

I checked the Bison manual and generating reentrant parsers isn’t the default, but can be enabled via an option . Old-fashioned YACC doesn’t seem to have an equivalent.

said on DD Mon YYYY at HH:MM

* do fancy stuff in your comment.

PREVIEW PANE