The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
This is a Textile Test

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Eric Stewart

Posts: 72
Nickname: estewart
Registered: Dec, 2003

Eric Stewart is software developer from Austin, Texas.
This is a Textile Test Posted: Dec 5, 2003 1:57 AM
Reply to this message Reply

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.
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Eric Stewart
Latest Posts From Ponderings On Ruby

Advertisement

Textile?

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:
  1. one
  2. two
  3. three

hypertext link? Will the quote marks in the tags get messed up? No!

This is a link

An image: optional alt text
  1. Librarians rule
  2. Yes they do
  3. But you kne 1000 w that
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:

	$text = str_replace("<p>%::%</p>","",$text);
	$text = str_replace("%::%</p>","",$text);
	$text = str_replace("%::%","",$text);


This isn’t code. So you see, my friends:
  • The time is now
  • The time is not later
  • The time is not yesterday
  • We must act

Read: This is a Textile Test

Topic: What Do You Value? Previous Topic   Next Topic Topic: Russian-Language Ruby Resource

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use