This post originated from an RSS feed registered with Ruby Buzz
by Eric Stewart.
Original Post: This is a Textile Test
Feed Title: Ponderings On Ruby
Feed URL: http://blog.eric-stewart.com/category/programming-ruby.rss
Feed Description: This is the Ruby related section of Eric Stewart's weblog. These entries will be the commentary of a long time Java/C++ programmer that started exploring Ruby in 2003.
A while back I had come across Textile, a “Humane Web Text Generator.” For those familiar with using Wikis, it is basically a Wiki-like formatting tool.
What are you doing with it?
Rublog has become my first Ruby playground. Once the initial kinks got worked out, I looked to see what would be simple to play with. WhyTheLuckyStiff had already created a Textile processor for Ruby called RedCloth.
I wrote a quick Rublog plugin to process posts written in textile using RedCloth and it is partially working as can be seen below. Much of the Textile markup is converted properly while much more is not, but this has only been the first attempt. I’ll continue to chip away at it.
It seems RedCloth currently supports a subset of Textile version 2 and doesn’t quite support the following:
Adding a second level to a list seems to break
Style markup doesn’t work
Tables don’t seem to be supported either
Other than that is was a cinch to plug in as a new converter for Rublog.
The following came from sample markup at the Textism site
This is a title
This is a subhead
This is some text of dubious character. Isn’t the use of “quotes” just lazy writing and theft of ‘intellectual property’ besides? I think the time has come to see a block quote.
This is a block quote. I’ll admit it’s not the most exciting block quote ever devised.
Simple list:
one
two
three
hypertext link? Will the quote marks in the tags get messed up? No!
Some more text of dubious character. Here is a noisome string of CAPITAL letters. Here is something we want to emphasize.
That was a linebreak. And something to indicate strength. Of course I could use my own HTML tags if I felt like it.
Coding
This is some code, "isn't it". Watch those quote marks! Now for some preformatted text: