Escaping '<'

John Gruber gruber at fedora.net
Thu Jan 6 11:29:42 EST 2005


Matt Lyon <matt at postsomnia.com> wrote on 01/06/05 at 6:17am:

> The Rails framework for Ruby uses <% ... %> too, however, valid 
> codeblocks may also start with `<%=` or `<%=h `, where  the equal sign 
> inidicates the function outputs, and `h` may be any ascii character 
> calling a helper function. It would be lovely if the regex for the above 
> sequences didn't require a space directly after the initial punctuation 
> delimiter.

No problem. Those weren't regex patterns, just simple placeholders.
The idea would be to ignore everything that starts with `<%` or `<?`
and ends with the next occurance of the corresponding closing
sequence.

I'm pretty sure there's already code in SmartyPants that knows how
to do this, in fact -- although I'm not sure if it includes the
ASP-style delimiters.

-J.G.


More information about the Markdown-Discuss mailing list