[kramdown-users] smartypants-only switch
matt at tidbits.com
Sun Aug 8 15:34:24 EDT 2010
On Aug 8, 2010, at 11:19 AM, Thomas Leitner wrote:
>> <title markdown="smarty">Isn't this a *test*?</title>
>> Would yield:
>> <title>Isn’t this a *test*?</title>
>> But perhaps there is already a better way to do this and I've
>> forgotten what it is...?
> No, there is currently no way to do this except by subclassing the
> kramdown parser and removing the parsers for the smart quotes. The you
> can use kramdown without in-built smartpants support and use rubypants
> to do the smartypants part.
I don't want to remove the smart quote parser at his point. I've adjusted RubyFrontier so that I don't need to do that.
(RubyFrontier is now officially supporting kramdown instead of Markdown, and I have been switching all my own sites from Markdown to kramdown. I really like kramdown's predictability and well-defined behavior, plus I use many of its added features such as inline span attributes, definition lists, and simple tables. Plus kramdown is faster because I don't have to context-switch to Perl. The RubyFrontier docs - see http://www.apeth.com/RubyFrontierDocs/ - are now built using kramdown instead of Markdown; they also use LESS, Haml, and other cool Ruby tools. RubyFrontier has made several changes to accommodate kramdown's behavior; right now the most serious issue facing me is that kramdown changes attribute order inside literal HTML tags, as I've pointed out in a different thread.)
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.
More information about the kramdown-users