RedCloth full textile support?

Discussion in 'Ruby' started by Rick DeNatale, Feb 1, 2008.

  1. 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/
     
    Rick DeNatale, Feb 1, 2008
    #1
    1. Advertising

  2. 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
     
    Rob Biedenharn, Feb 1, 2008
    #2
    1. Advertising

  3. Yep, I'm dyslexic I guess ;-(

    On Feb 1, 2008 5:35 PM, Rob Biedenharn <> 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
    >
    >
    >
    >




    --
    Rick DeNatale

    My blog on Ruby
    http://talklikeaduck.denhaven2.com/
     
    Rick DeNatale, Feb 1, 2008
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. why the lucky stiff
    Replies:
    0
    Views:
    119
    why the lucky stiff
    Feb 6, 2004
  2. why the lucky stiff
    Replies:
    0
    Views:
    100
    why the lucky stiff
    Apr 2, 2004
  3. why the lucky stiff
    Replies:
    0
    Views:
    103
    why the lucky stiff
    Apr 8, 2004
  4. why the lucky stiff
    Replies:
    0
    Views:
    113
    why the lucky stiff
    Apr 14, 2004
  5. why the lucky stiff
    Replies:
    0
    Views:
    102
    why the lucky stiff
    Apr 16, 2004
Loading...

Share This Page