# Markdown + Smarty Pants

**URL:** <https://www.ruby-forum.com/t/markdown-smarty-pants/98744>\
**Category:** Radiant CMS\
**Created:** [July 17, 2006, 10:29pm UTC](https://www.ruby-forum.com/t/markdown-smarty-pants/98744 "2006-07-17T22:29:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![John\_WSLong](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/34f0e0/32.png) [@John\_WSLong](https://www.ruby-forum.com/u/John_WSLong)\
**Post date:** [July 17, 2006, 10:29pm UTC](https://www.ruby-forum.com/t/markdown-smarty-pants/98744/1 "2006-07-17T22:29:47Z")

</div>

Working on the 0.5.1 release this week and scanning through various  
patches today.

A patch on ticket 83 adds two filters to Radiant:

- A SmartyPants filter for curling quotes (via RubyPants)
- A Markdown+SmartyPants filter which combines the two

Since Textile curls quotes automatically, my first thought is to just  
add the SmartyPants functionality to the existing Markdown filter. Is  
there a good reason not to do this? Should we ship a separate  
SmartyPants filter as well?

More info: [http://dev.radiantcms.org/radiant/ticket/83](http://dev.radiantcms.org/radiant/ticket/83)

Thoughts?

–  
John L.  
[http://wiseheartdesign.com](http://wiseheartdesign.com)

---

<div class="post-metadata">

**Author:** ![John\_WSLong](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/34f0e0/32.png) [@John\_WSLong](https://www.ruby-forum.com/u/John_WSLong)\
**Post date:** [July 17, 2006, 10:46pm UTC](https://www.ruby-forum.com/t/markdown-smarty-pants/98744/2 "2006-07-17T22:46:01Z")

</div>

Sort of unrelated, but you may want to note that right now the Textile  
filter also filters some Markdown. This is because BlueCloth features  
some  
limited support for Markdown syntax, such as links. For example, if you  
create a page with content

This post uses [textile](http://www.textism.com/tools/textile/).

> 

Then use the Textile filter, you will see the link output correctly. Not  
a  
big deal, and an easy fix : RedCloth.new → RedCloth::Textile.new but  
I’m  
not sure if it’s something to fix or just leave alone?

PS: There was a recent thread on the Typo list about this:  
[http://rubyforge.org/pipermail/typo-list/2006-July/002879.html](http://rubyforge.org/pipermail/typo-list/2006-July/002879.html)

|| Dean

---

<div class="post-metadata">

**Author:** ![John\_WSLong](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/34f0e0/32.png) [@John\_WSLong](https://www.ruby-forum.com/u/John_WSLong)\
**Post date:** [July 17, 2006, 11:34pm UTC](https://www.ruby-forum.com/t/markdown-smarty-pants/98744/3 "2006-07-17T23:34:05Z")

</div>

Dean S. wrote:

> Then use the Textile filter, you will see the link output correctly. Not a  
> big deal, and an easy fix : RedCloth.new → RedCloth::Textile.new but I’m  
> not sure if it’s something to fix or just leave alone?

So what you are saying is that by default Redcloth filters both Textile  
_and_ Markdown? And the fix is to use Redcloth::Textile.new rather than  
Redcloth.new ?

–  
John L.  
[http://wiseheartdesign.com](http://wiseheartdesign.com)

---

<div class="post-metadata">

**Author:** ![John\_WSLong](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/34f0e0/32.png) [@John\_WSLong](https://www.ruby-forum.com/u/John_WSLong)\
**Post date:** [July 18, 2006, 12:51am UTC](https://www.ruby-forum.com/t/markdown-smarty-pants/98744/4 "2006-07-18T00:51:37Z")

</div>

> So what you are saying is that by default Redcloth filters both Textile  
> _and_ Markdown? And the fix is to use Redcloth::Textile.new rather than  
> Redcloth.new ?

That’d be it. I’m not sure if Redcloth does _all_ of the Markdown  
syntax,  
but it does do some of it (links being the one I know for sure).

I didn’t especially test that fix, but it’s what the guys on the Typo  
list  
figured. I can test it & provide a patch w/ tests if needed.

|| Dean
