[kramdown-users] feature request - ignore ERB-style code

Matt Neuburg matt at tidbits.com
Sun Mar 28 18:45:04 EDT 2010

It would be a great help to me if kramdown would ignore ERB expressions,
such as this:

<% yoho="yoho" %>

What I'd like kramdown to do when it sees something like that is (1) ignore
what's inside it, so the quotation marks are not made curly, (2) ignore the
tag marks, so they are not entityized, and (3) ignore the paragraph as a
whole, so it isn't wrapped in <p> tags.

The reason is that my RubyFrontier Web site-building framework makes use of
ERB, and expressions of this sort are still present through a page's text at
the moment I want to apply kramdown to it.

In other words, the current output for something like that is:

<p>&lt;% yoho=&rdquo;yoho&rdquo; %&gt;</p>

and what I want it to be is:

<% yoho="yoho" %>

i.e. it should be untouched. ERB will be applied at a later stage of the
page-building process, and the ERB expressions will thus be removed or
replaced by other material.


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

More information about the kramdown-users mailing list