Only 5 tests out of 376 currently failing!

Good news! SuperRedCloth is down to just five failing tests! I was
down to 10 or so in mid-February but then I added test cases from
“The official reference manual for Textile 2”, which added 97 new
tests, many of them failing. I’m happy to say, they’re almost all
passing now.

Four of these last five I just need to check with you on before I
deviate from Textile 2.0 (as published at Threshold State).

Still in the pre.

but was: "

  Properly escaped here.  <pre>    a =
Still in the pre.


I’m just too lazy to fix this.


<p id=“fn1”>1 The footnote."
“footnote”><a href="#fn1216642796463b1223ae29d">1."
but was: “

A close<img src=”/img.gif" alt="" />image.
tight<a href=“”>textlink.
A <a
href=“”>footnoted link<a href=


Evidently Textile 2 generates a unique id for footnotes, I assume so
you can have different sections on one web page and their footnotes
won’t conflict as ids or named anchors. I could see how it could be
desirable, though, to refer to a footnote and list it in different
sections (rendered by RedCloth separately). What do you think?

but was: “p. Leave me alone”
Here, even though it protects the contents of the tags,
it wraps the whole thing in a

tag. I disagree, and so does
RedCloth (why added the test for it at [141].

 ./test/helper.rb:11:in `assert_html_equal'

expected: “

and outside.”
but was: “

and outside.

Isn’t a div inside a p invalid? SRC is smart enough to not wrap a
block element in a P tag. If that div were a span, SRC would enclose
it just fine:

inside and outside.

376 tests, 376 assertions, 5 failures, 0 errors

So, unless you tell me otherwise, I plan to:
1.) Stay lazy and throw away the test for nested pre tags. If
someone has a problem with it, they’ll complain and submit a patch.
2.) Leave footnotes with simple ids (no generated unique ids)
3.) Leave notextile tag handling as it was in RedCloth and is in SRC
4.) Stick with SRC’s smarter handling of block tags in a paragraph

Note: If you try compiling SRC trunk, you’ll need to have Ragel newer
than 6.0 (i.e. you’ll need to check out the trunk). SRC uses leaving
actions in scanners, which will be released in Ragel 6.1.


I agree with all the options. Baby needs (re)birth.

On release, please add the generated c files to the gem to avoid ragel
dependency. A 2Mb download is easier then installing ragel from svn !


2008/3/10, Jason G. [email protected]:

PS: thanks for the great work !

2008/3/11, Gaspard B. [email protected]:

i’m just a forum lurker (no ragel skillz here), but my input –

2.) Leave footnotes with simple ids (no generated unique ids)
I agree – really, if you’ve got two footnotes marked “n1” on the same
page, you’ve already got problems from a user’s perspective. adding the
unique ids makes the page happy (unique html IDs) but not the user (um,
which footnote 1 is this?).
4.) Stick with SRC’s smarter handling of block tags in a paragraph
yay, this is one of the things that always bothered me about RC (and
various PHP textile implementations).

i can’t tell you how excited i am that we’ll have a proper
(test-passing) redcloth. thanks for pushing this along jason … we owe