[kramdown-users] feature request - separate out SmartyPants functionality

Thomas Leitner t_leitner at gmx.at
Sun Apr 4 03:10:59 EDT 2010


On Sun, 28 Mar 2010 15:38:42 -0700, Matt Neuburg wrote:
> kramdown isn't just Markdown; it's Markdown plus SmartyPants.
> Unfortunately, this is causing trouble for my Web site-building
> framework (RubyFrontier - see URL below for more information). With
> Markdown, I am able to apply Markdown at an early stage, when a page
> is partially built, and then finish the process by applying
> SmartyPants when the page is completely built.

Why would you want to separate these two stages? Markdown converts text
to HTML and *Pants converts regular quotes to nice ones, normally
using HTML entities. So if the user already used HTML entities in the
first place, there would be no difference after running kramdown.
 
> What I'd like is an option that turns off SmartyPants functionality,
> and another option that turn on *only* SmartyPants functionality.
> That way, I could apply kramdown twice - once early in the process,
> without SmartyPants functionality, and then again at the end of the
> process, with only SmartyPants functionality.

As has been said often on the Markdown ML, adding options to customize
the parsing stage of a Markdown parser is considered harmful. I have
already included options for customizing how HTML is parsed and I
currently consider removing that option.

What you can do, however, is to customize the HTML converter to output
normal quotes instead of curly ones.

If you *only* want SmartyPants functionality, use RubyPants!

> I have a sort of workaround but it is raising more difficulties than
> it solves. The real problem is just that kramdown is doing too much.
> I really want to switch from using Markdown to using kramdown but
> this is a troublesome issue. m.

What are the parts where kramdown does too much? Since kramdown is
inspired by Maruku and PHP Markdown Extra it adds some additional
parsing functionality besides the normal Markdown syntax but this is a
feature.

-- Thomas


More information about the kramdown-users mailing list