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: "
Still in the pre.Properly escaped here. <pre> a =
1"
I’m just too lazy to fix this.
sup>.
<p id=“fn1”>1 The footnote."
“footnote”><a href="#fn1216642796463b1223ae29d">1."
but was: “A close<img src=”/img.gif" alt="" />image.
"
A
tight<a href=“http://thresholdstate.com/”>textlink.
A <a
href=“http://thresholdstate.com/”>footnoted link<a href=
“#fn1”>1.
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 atag. I disagree, and so does
RedCloth (why added the test for it at [141].
./test/helper.rb:11:in `assert_html_equal' ./test/test_parser.rb:16:in
`test_threshold_paragraphs_partly_enclosed_in_xhtml_block_tags’]:
expected: “insideand outside.”
but was: “insideand 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
Awesome.
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.
Jason