[kramdown-users] Towards the one-oh-oh
matt at tidbits.com
Thu May 6 12:41:24 EDT 2010
On or about 5/5/10 10:42 PM, thus spake "Thomas Leitner" <t_leitner at gmx.at>:
> So as I said before this is a functionality that will not likely make
> it into the base parser because this is something that should be done
> by the framework using kramdown (i.e. using ERB before kramdown).
And indeed I did change RubyFrontier so that kramdown *could* be run just
after ERB runs. But this might not meet every need. To be brief, the problem
is that by that moment in the process the Web page source has been inserted
into the template, and there can be good reason to want to run Markdown /
kramdown on just the page source alone and not the surrounding template.
To be sure, Markdown doesn't understand ERB either; but what it does to ERB
expressions is simple and predictable and I can just undo it - basically all
it does is to entityize the opening left angle bracket, so I just replace
"<%" with "<%" and all is well. But kramdown doesn't realize that ERB
tags are tags at all; it reaches right inside them and meddles with their
<% @x = "This is code" %>
<p><% @x = “This is code” %></p>
Even just being able to turn off the smartypants part of kramdown might be
enough to allow me to reverse this in most cases, and then the problem would
be no worse than it is with Markdown. But what I'm looking for is something
*better* than Markdonw. My approach was always a hack with Markdown; indeed,
part of the reason I want to dump Markdown and use kramdown is that I'm
always fighting against Markdown, hacking around its bugs and limitations,
whereas kramdown (1) is alive and open and under development, and (2) it's
Ruby, with all that that implies.
Thus, with enough options and Ruby-style customizability built in, kramdown
can be a much better choice for me. It sounds like that's the direction
things are going, so I'll continue to wait and see how things develop.
Thanks for the detailed hints! 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
TidBITS, Mac news and reviews since 1990, http://www.tidbits.com
More information about the kramdown-users