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

  • Thread starter why the lucky stiff
  • Start date
W

why the lucky stiff

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
 
D

David Heinemeier Hansson

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 --- => <hr> (which
is especially important for wikis) and easy way of doing <pre><code>
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/
 
W

why the lucky stiff

David said:
This is excellent. That was one of the reasons I thought about trying
out Markdown for something significant. That an the --- => <hr> (which
is especially important for wikis) and easy way of doing <pre><code>
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 said:
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
 
D

David Heinemeier Hansson

I'm not keen on changing any existing syntax. But adding horizontal
rules and shortcut code for <pre><code> 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 (<pre><code>)?

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

<blockquote>
<p>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>

<p>Donec sit amet nisl. Aliquam semper ipsum sit amet velit.
Suspendisse
id sem consectetuer libero luctus adipiscing.</p>
</blockquote>

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

<pre><code>
WebserviceController
before_filter :token_auth

AdministrationController
before_filter :ensure_login, :audit
</code></pre>

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

<blockquote>
<p>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>

<p>Donec sit amet nisl. Aliquam semper ipsum sit amet velit.
Suspendisse
id sem consectetuer libero luctus adipiscing.</p>
</blockquote>
 
C

Chris Morris

David said:
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 <textarea>.

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
 
M

Mark Hubbart

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 <pre><code> would be absolutely fine.

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 ;)

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

cheers,
--Mark
 
D

David Heinemeier Hansson

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.
 
M

Mauricio Fernández

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 <textarea>.

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

--
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top