RedCloth full textile support?

R

Rick DeNatale

I'm trying to use the redcloth gem to do textile markup.

It works, but doesn't seem to support the full set of markup.

For example trying a few examples from:
http://hobix.com/textile/quick.html which is linked to from _why?s
Redcloth page http://whytheluckystiff.net/ruby/redcloth/

require 'rubygems'
require 'redcloth'

class String
def textilize
RedCloth.new(self).to_html
end
end

"*bold* _italic_".textilize # => "<p><strong>bold</strong> <em>italic</em></p>"
".h1 Heading".textilize # => "<p>.h1 Heading</p>"

So a few things seems to work but many more don't.

Is there something I'm missing?
 
R

Rob Biedenharn

I'm trying to use the redcloth gem to do textile markup.

It works, but doesn't seem to support the full set of markup.

For example trying a few examples from:
http://hobix.com/textile/quick.html which is linked to from _why?s
Redcloth page http://whytheluckystiff.net/ruby/redcloth/

require 'rubygems'
require 'redcloth'

class String
def textilize
RedCloth.new(self).to_html
end
end

"*bold* _italic_".textilize # => "<p><strong>bold</strong>
<em>italic</em></p>"
".h1 Heading".textilize # => "<p>.h1 Heading</p>"

So a few things seems to work but many more don't.

Is there something I'm missing?

Perhaps:
irb> "h1. Heading".textilize
=> "<h1>Heading</h1>"

Not ".h1" but "h1." does a heading.

-Rob
--
Rick DeNatale

My blog on Ruby
http://talklikeaduck.denhaven2.com/

Rob Biedenharn http://agileconsultingllc.com
(e-mail address removed)
 

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,995
Messages
2,570,231
Members
46,820
Latest member
GilbertoA5

Latest Threads

Top