[SVN] Re: Language Grammar Using Significant Whitespace, Including Another (sans indentation)

Allan Odgaard mailinglist at textmate.org
Sun Feb 28 10:29:18 UTC 2010


On 23 Feb 2010, at 01:09, Gavin Kistner wrote:

> Summary:
> Is it possible to write a grammar for Haml that provides proper  
> syntax highlighting on Markdown filters?

Ideally such parser would use a state variable and pre-process the  
indented (markdown) lines, so not really, as that can’t be done with a  
declarative system.

You might be able to approximate it by matching the indented markdown  
filter starter, capture the indent, and use that capture to end the  
rule. Inside the rules you can match at least the inline Markdown  
formatting codes, but block level would be a challenge, at least those  
which span multiple lines (and are themselves indent sensitive).




More information about the textmate-dev mailing list