# RedCloth full textile support?

**URL:** <https://rubytalk.org/t/redcloth-full-textile-support/44205>\
**Category:** ruby-talk\
**Created:** [1 February 2008 21:49 UTC](https://rubytalk.org/t/redcloth-full-textile-support/44205 "2008-02-01T21:49:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rick\_DeNatale1](https://avatars.discourse-cdn.com/v4/letter/r/bbce88/32.png) [@Rick\_DeNatale1](https://rubytalk.org/u/Rick_DeNatale1)\
**Post date:** [1 February 2008 21:49 UTC](https://rubytalk.org/t/redcloth-full-textile-support/44205/1 "2008-02-01T21:49:22Z")

</div>

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](http://hobix.com/textile/quick.html) which is linked to from \_why?s  
Redcloth page [http://whytheluckystiff.net/ruby/redcloth/](http://whytheluckystiff.net/ruby/redcloth/)

require 'rubygems'  
require 'redcloth'

class String  
&nbsp;&nbsp;def textilize  
&nbsp;&nbsp;&nbsp;&nbsp;RedCloth.new(self).to\_html  
&nbsp;&nbsp;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/](http://talklikeaduck.denhaven2.com/)

---

<div class="post-metadata">

**Author:** ![Rob\_Biedenharn1](https://avatars.discourse-cdn.com/v4/letter/r/57b2e6/32.png) [@Rob\_Biedenharn1](https://rubytalk.org/u/Rob_Biedenharn1)\
**Post date:** [1 February 2008 22:35 UTC](https://rubytalk.org/t/redcloth-full-textile-support/44205/2 "2008-02-01T22:35:23Z")

</div>

> 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](http://hobix.com/textile/quick.html) which is linked to from \_why?s  
> Redcloth page [http://whytheluckystiff.net/ruby/redcloth/](http://whytheluckystiff.net/ruby/redcloth/)
> 
> require 'rubygems'  
> require 'redcloth'
> 
> class String  
> def textilize  
> &nbsp;&nbsp;&nbsp;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:

> "h1. Heading".textilize

=\> "\<h1\>Heading\</h1\>"

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

-Rob

> --  
> Rick DeNatale
> 
> My blog on Ruby  
> [http://talklikeaduck.denhaven2.com/](http://talklikeaduck.denhaven2.com/)

Rob Biedenharn [http://agileconsultingllc.com](http://agileconsultingllc.com)  
Rob@AgileConsultingLLC.com

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

---

<div class="post-metadata">

**Author:** ![Rick\_DeNatale1](https://avatars.discourse-cdn.com/v4/letter/r/bbce88/32.png) [@Rick\_DeNatale1](https://rubytalk.org/u/Rick_DeNatale1)\
**Post date:** [1 February 2008 23:02 UTC](https://rubytalk.org/t/redcloth-full-textile-support/44205/3 "2008-02-01T23:02:53Z")

</div>

Yep, I'm dyslexic I guess ;-(

> **···**
>
> On Feb 1, 2008 5:35 PM, Rob Biedenharn \<Rob@agileconsultingllc.com\> 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:  
> > \> [Textile Quick Reference](http://hobix.com/textile/quick.html) which is linked to from \_why?s  
> > \> Redcloth page [http://whytheluckystiff.net/ruby/redcloth/](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:  
> > \> "h1. Heading".textilize  
> > =\> "\<h1\>Heading\</h1\>"
> > 
> > Not ".h1" but "h1." does a heading.
> > 
> > -Rob
> > 
> > \> --  
> > \> Rick DeNatale  
> > \>  
> > \> My blog on Ruby  
> > \> [http://talklikeaduck.denhaven2.com/](http://talklikeaduck.denhaven2.com/)  
> > \>
> > 
> > Rob Biedenharn [http://agileconsultingllc.com](http://agileconsultingllc.com)  
> > Rob@AgileConsultingLLC.com
> 
> --  
> Rick DeNatale
> 
> My blog on Ruby  
> [http://talklikeaduck.denhaven2.com/](http://talklikeaduck.denhaven2.com/)
