[kramdown-users] smartypants-only switch

Thomas Leitner t_leitner at gmx.at
Tue Aug 10 05:28:21 EDT 2010

> I just want a way to access the smart quote parser only (and no other
> parser) in certain tags. I'd like to request this formally as a
> kramdown feature - in addition to markdown="0", markdown="1",
> markdown="span", I'm wondering if we could have markdown="smarty".
> This would be only for rare tags like the <title>. Of course I can
> work around this in other ways, but I'm thinking that
> markdown="smarty" might be faster than markdown="span" because it
> doesn't have to look for asterisks and backticks and other span-level
> markup. If it's too hard to do I can live without it; but I thought
> you might see this as a useful idea.

I don't think that putting this feature into kramdown would be the
correct way to go. The request means that you basically want to use
some parts of the parser and not another ones. If we would implement
this, why shouldn't we also implement another exception, for example,
so that only paragraphs and block quotes are parsed instead of all
block level elements?

Isn't it easier in your case to run kramdown over the whole document
and the rubypants afterwards? You said that rubypants knows that it
only has to look inside HTML tags and don't mess with attributes. So,
in the case you mentioned, running kramdown and then rubypants should
be sufficient, shouldn't it?

-- Thomas

More information about the kramdown-users mailing list