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

Shawn Van Ittersum svicalifornia at gmail.com
Sun Mar 28 21:15:27 EDT 2010


Hi Matt,

Why not apply ERB first to yield proper kramdown syntax, then apply  
kramdown?

Shawn
[sent from mobile phone]

On Mar 29, 2010, at 8:45 AM, Matt Neuburg <matt at tidbits.com> wrote:

> 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.
>
> 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
> http://www.tidbits.com/matt/default.html#applescriptthings
> Take Control of Exploring & Customizing Snow Leopard
> http://tinyurl.com/kufyy8
> 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
> http://rubyforge.org/mailman/listinfo/kramdown-users


More information about the kramdown-users mailing list