[kramdown-users] feature request - separate out SmartyPants functionality
Shawn Van Ittersum
svicalifornia at gmail.com
Sun Mar 28 22:05:49 EDT 2010
I am in favor of a flag to turn off the SmartyPants behavior. However, running kramdown with *nothing but* SmartyPants doesn't seem to make much sense. That wouldn't be kramdown anymore; it would just be SmartyPants.
More broadly, I am concerned about your requests for kramdown to accommodate external languages and processes. It's difficult enough to make an rich, expressive, but simple kramdown syntax that can be parsed quickly in pure Ruby. Asking kramdown to bend around ERB and other languages is just a bit too much. I don't want to see kramdown's simplicity and ease of use compromised because we force it to accommodate external languages and systems.
Your problem should be solvable by doing your ERB parsing and other manipulations first, then running kramdown a single time on the result. ERB is already designed to accommodate practically any other language, by using its unique <% .. %> tags. Since ERB doesn't mind kramdown, but kramdown doesn't handle ERB well, the correct order of processing is ERB first, then kramdown.
If you have a compelling use case requiring text in post-kramdown HTML form for your intermediate manipulations, please let us know more so we can determine the best way to handle it.
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.
> 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.
> 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.
> matt neuburg, phd = matt at tidbits.com, http://www.tidbits.com/matt/
> pantes anthropoi tou eidenai oregontai phusei
> Among the 2007 MacTech Top 25, http://tinyurl.com/2rh4pf
> AppleScript: the Definitive Guide, 2nd edition
> Take Control of Exploring & Customizing Snow Leopard
> RubyFrontier! http://www.apeth.com/RubyFrontierDocs/default.html
> TidBITS, Mac news and reviews since 1990, http://www.tidbits.com
> kramdown-users mailing list
> kramdown-users at rubyforge.org
More information about the kramdown-users