[ANN] RedCloth 2.0.7 -- A Textile Humane Web Text Generator

more and more, you’ve seen it all before (i swear it’s slowin down):

RedCloth 2.0.7. Available in RAA.
http://rubyforge.org/frs/download.php/555/redcloth-2.0.7.tar.gz

RedCloth[1] is a module for using Textile in Ruby. Textile is a text
format. A very simple text format. Another stab at making readable
text that can be converted to HTML.

Credit this version to the reports from Jamis Buck and Bret Pettichord.
Jamis alerted me to problems with table attributes. [2] Table
attributes now work quite well and tests back it all up.

Bret Pettichord brought up lists. I guess in the original Textile you
can line up your text with the list markers:

  • List item one
    with a brief description

    Perhaps even more here.

  • List item two
    with another description

I’ve wanted this feature to work right for awhile. It took a rewrite of
the list handler, but it’s all there now.

Bret also brought up a problem with relative links. Links are a bit
greedier now. Better handling of punctuation in URLs.

Again, new reference up at http://hobix.com/textile/. True thanks!

_why

[1] http://whytheluckystiff.net/ruby/redcloth/
[2] http://hobix.com/textile/quick.html#tables

I’ve wanted this feature to work right for awhile. It took a rewrite
of the list handler, but it’s all there now.

This is excellent. That was one of the reasons I thought about trying
out Markdown for something significant. That an the — =>


(which
is especially important for wikis) and easy way of doing

blocks. Perhaps we could get Dean to let the next version of Textile be
inspired back?

One of the reasons I really like Textile over Markdown, though, is how
easy it is to do quick web-design in it with styles on the elements.
That’s really a powerful notion that I use to great effect on the
instiki.org front page.

Again, new reference up at http://hobix.com/textile/. True thanks!

Very, very nice. Only nitpick is that perhaps the page is just a wee
bit wide? How does this look on a 800x600 or 1024x768 screen?
Otherwise, I’m thinking of including this with the next version of
Instiki instead of linking out.

Perhaps someone (Granger?) could be so kind as to duplicate the effort
for Markdown? And something similar for RDoc would rock. All three
syntaxes presented in the same format. Yes please :).

If you want to play around with the Mardown and RDoc syntax, btw, I’ve
created a sandbox for Instiki running each:

Markdown sandbox: http://blue.instiki.org/
RDoc sandbox: http://green.instiki.org/

···


David Heinemeier Hansson,
http://instiki.nextangle.com/ – A No-Step-Three Wiki in Ruby
http://www.basecamphq.com/ – Web-based Project Management
http://www.loudthinking.com/ – Broadcasting Brain

David Heinemeier Hansson wrote:

This is excellent. That was one of the reasons I thought about trying
out Markdown for something significant. That an the — =>


(which
is especially important for wikis) and easy way of doing

blocks. Perhaps we could get Dean to let the next version of Textile be
inspired back?

I’m not too worried about extending Textile, to be honest. There are a
wealth of inaccuracies and loose ends on Dean Allen’s Textile site.
Which leads me to believe that it will likely continue to be incomplete.

I’m not keen on changing any existing syntax. But adding horizontal
rules and shortcut code for

 would be absolutely fine.

Very, very nice. Only nitpick is that perhaps the page is just a wee bit
wide? How does this look on a 800x600 or 1024x768 screen? Otherwise, I’m
thinking of including this with the next version of Instiki instead of
linking out.

I really like your sidebar reference. You could just add a popup link
to the quick reference. I’ll work on trimming down the full reference,
though.

_why

It looks fine on 1024x768.

···

At 05:30 AM 4/22/2004, David Heinemeier Hansson wrote:

Only nitpick is that perhaps the page is just a wee bit wide? How does
this look on a 800x600 or 1024x768 screen?


Bret Pettichord, Software Tester
Consultant - www.pettichord.com
Author - www.testinglessons.com
Blogger - www.io.com/~wazmo/blog

Homebrew Automation Seminar
April 30, Austin, Texas
www.pettichord.com/training.html

badly, I was going to send a message about this problem :slight_smile:

···

il Thu, 22 Apr 2004 19:30:22 +0900, David Heinemeier Hansson david@loudthinking.com ha scritto::

Very, very nice. Only nitpick is that perhaps the page is just a wee
bit wide? How does this look on a 800x600 or 1024x768 screen?

I’m not keen on changing any existing syntax. But adding horizontal
rules and shortcut code for

 would be absolutely fine.

Where Markdown has plenty of ways to do the same thing, Textile seems
to prefer one. So I think that should be the way forward. How about —
for a horizontal ruler? RDoc does that and it works in Markdown as
well.

Maybe “cd.” for a code block (

)?

Also, it would be really nice if there was someway to have multiple
paragraphs in both blockquotes and these new code blocks. Just like
you’ve added with the lists. Perhaps if you space thrice (or more),
just like with the lists, so:

bq. This is a blockquote with two paragraphs. Lorem ipsum dolor sit
amet, consectetuer adipiscing elit. Aliquam hendrerit mi posuere
lectus. Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae,
risus.

 Donec sit amet nisl. Aliquam semper ipsum sit amet velit. 

Suspendisse id sem consectetuer libero luctus adipiscing.

becomes

This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus.

 <p>Donec sit amet nisl. Aliquam semper ipsum sit amet velit. 

Suspendisse
id sem consectetuer libero luctus adipiscing.

The code blocks are a bit more tricky since the whitespace is
significant. Markdown uses the “colon and everything starts at four
spaces in”-style, but that doesn’t really seem to be the Textile way.
Perhaps two consecutive cd’s could just be merged into one?

cd. WebserviceController
before_filter :token_auth

cd. AdministrationController
before_filter :ensure_login, :audit

becomes


WebserviceController
    before_filter :token_auth

AdministrationController
    before_filter :ensure_login, :audit

This could actually also work well for the blockquotes:

bq. This is a blockquote with two paragraphs. Lorem ipsum dolor sit
amet, consectetuer adipiscing elit. Aliquam hendrerit mi posuere
lectus. Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae,
risus.

bq. Donec sit amet nisl. Aliquam semper ipsum sit amet velit.
Suspendisse id sem consectetuer libero luctus adipiscing.

becomes

This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus.

 <p>Donec sit amet nisl. Aliquam semper ipsum sit amet velit. 

Suspendisse
id sem consectetuer libero luctus adipiscing.

···


David Heinemeier Hansson,
http://instiki.nextangle.com/ – A No-Step-Three Wiki in Ruby
http://www.basecamphq.com/ – Web-based Project Management
http://www.loudthinking.com/ – Broadcasting Brain

how about headers? It would be killer if you could add the header
markup that RDoc/Markdown use:

=== Header ===
etc…

I never felt that the “h1.” markup was terribly intuitive… I tried to
imagine myself explaining it to a client, or anyone else with no html
experience, and I gave up on the idea pretty quick :wink:

Of course, if that would be straying too far from the reference
implementation…

cheers,
–Mark

···

On Apr 22, 2004, at 7:59 AM, why the lucky stiff wrote:

I’m not too worried about extending Textile, to be honest. There are
a wealth of inaccuracies and loose ends on Dean Allen’s Textile site.
Which leads me to believe that it will likely continue to be
incomplete.

I’m not keen on changing any existing syntax. But adding horizontal
rules and shortcut code for

 would be absolutely fine.

Has the world changed, or have I changed?

Using RedCloth 2.0.6, the docs say

h1.a header

should render a header, but I get just a paragraph.

If I try

h1. a header

it works fine, but the docs don’t mention a trailing space…

···


There are three ways to get something done:
(1) Do it yourself.
(2) Hire someone to do it for you.
(3) Forbid your kids to do it.
Rasputin :: Jack of All Trades - Master of Nuns

David Heinemeier Hansson wrote:

Also, it would be really nice if there was someway to have multiple
paragraphs in both blockquotes and these new code blocks. Just like
you’ve added with the lists. Perhaps if you space thrice (or more),
just like with the lists, so:

bq. This is a blockquote with two paragraphs. Lorem ipsum dolor sit
amet, consectetuer adipiscing elit. Aliquam hendrerit mi posuere
lectus. Vestibulum enim wisi, viverra nec, fringilla in, laoreet
vitae, risus.

Donec sit amet nisl. Aliquam semper ipsum sit amet velit. 

Suspendisse id sem consectetuer libero luctus adipiscing.

I’ve implement blockquotes in my own wiki like this:


This is inside a blockquote

nested blockquote
[/]
[/]

RDoc’s SimpleMarkup simply blockquotes based on how you indent (IIRC),
which is nice, except that requires an editor more powerful than .

I like SimpleMarkup’s way of doing headers better

==This is a H2 Header
===This is a H3 Header

because this has better textual visualization to me than:

h2. This is a H2 Header
h3. This is a H3 Header

···


Chris
http://clabs.org

how about headers? It would be killer if you could add the header
markup that RDoc/Markdown use

I sympathize with this idea, but I think RedCloth needs to stay true to
Textile. Although similar to Markdown and RDoc, it really is of its own
kind. I never thought I’d repeat it, but adding “=== Header ===” to
RedCloth would seem “funky” to me in a Dave Winerian sense.

Textile has one solution for each markup problem. That’s part of the
Textile design. It’s fabric. Markdown, on the other hand, is much more
lenient and attempts to be a parser for plain text emails. That’s the
Markdown design. Both approaches are equally valid, but distinct.

Hence, I’d advice Why to be true to Textile in his additions. That’ll
make it much more likely that Dean will adopt the extensions back into
the “official” Textile and that content created with RedCloth will be
portable across Textile implementations.

···


David Heinemeier Hansson,
http://instiki.nextangle.com/ – A No-Step-Three Wiki in Ruby
http://www.basecamphq.com/ – Web-based Project Management
http://www.loudthinking.com/ – Broadcasting Brain

Has the world changed, or have I changed?

Using RedCloth 2.0.6, the docs say

h1.a header

According to the Textile reference from Dean, there’s always a required
space. So this is expected behavior. The note in the RedCloth
documentation is just an error.

···


David Heinemeier Hansson,
http://www.instiki.org/ – A No-Step-Three Wiki in Ruby
http://www.basecamphq.com/ – Web-based Project Management
http://www.loudthinking.com/ – Broadcasting Brain

I can extend SimpleMarkup if you think of a syntax that doesn’t conflict
with the existing one and looks good.

···

On Fri, Apr 23, 2004 at 02:18:56AM +0900, Chris Morris wrote:

I’ve implement blockquotes in my own wiki like this:


This is inside a blockquote

nested blockquote
[/]
[/]

RDoc’s SimpleMarkup simply blockquotes based on how you indent (IIRC),
which is nice, except that requires an editor more powerful than .


Running Debian GNU/Linux Sid (unstable)
batsman dot geo at yahoo dot com

‘Ooohh… “FreeBSD is faster over loopback, when compared to Linux
over the wire”. Film at 11.’
– Linus Torvalds