Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > RedCloth full textile support?

Reply
Thread Tools

RedCloth full textile support?

 
 
Rick DeNatale
Guest
Posts: n/a
 
      02-01-2008
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?

--
Rick DeNatale

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

 
Reply With Quote
 
 
 
 
Rob Biedenharn
Guest
Posts: n/a
 
      02-01-2008

On Feb 1, 2008, at 4:49 PM, Rick DeNatale wrote:

> 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
http://www.velocityreviews.com/forums/(E-Mail Removed)


 
Reply With Quote
 
 
 
 
Rick DeNatale
Guest
Posts: n/a
 
      02-01-2008
Yep, I'm dyslexic I guess ;-(

On Feb 1, 2008 5:35 PM, Rob Biedenharn <(E-Mail Removed)> wrote:
>
> On Feb 1, 2008, at 4:49 PM, Rick DeNatale wrote:
>
> > 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 Removed)
>
>
>




--
Rick DeNatale

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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[ANN] RedCloth 2.0.6 -- A Textile Humane Web Text Generator why the lucky stiff Ruby 0 04-16-2004 06:28 PM
[ANN] RedCloth 2.0.5 -- A Textile Humane Web Text Generator why the lucky stiff Ruby 0 04-14-2004 08:06 PM
[ANN] RedCloth 2.0.4 -- A Textile Humane Web Text Generator why the lucky stiff Ruby 0 04-08-2004 06:41 PM
[ANN] RedCloth 2.0.3 -- A Textile Humane Web Text Generator why the lucky stiff Ruby 0 04-02-2004 10:21 PM
[ANN] RedCloth 2.0 -- A Textile Humane Web Text Generator why the lucky stiff Ruby 0 02-06-2004 09:44 PM



Advertisments