Markdown + Smarty Pants

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

Thoughts?


John L.
http://wiseheartdesign.com

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.

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

|| Dean

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

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

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs