Alternative to look-behind (was: [SVN] Revision 1203 (markdown))

hadley wickham h.wickham at gmail.com
Fri Jun 24 17:11:34 UTC 2005


> Sorry to use this as my example, but often look-behind can be avoided
> by instead making a rule that "eats" the escape sequence(s) one tries
> to avoid.
> 
> So for example if we add this rule to markdown:
> 
>      {   name = "constant.character.escape.markdown";
>          match = "\\\\[-`*_#+.!(){}\\[\\]\\\\]";
>      },
> 
> I'm leaving it to Hadley though to decide if he wants to include it!
> Probably you'd also want to switch to a one combined grammar now that
> 1.1b13 can do local includes and recursion.

That looks great and I'll include as soon as I get a spare moment. 
That along with Haris' extra test cases should get most of the bugs
sorted out hopefully.

Overall, I think we're doing pretty well considering that markdown use
a lot of other tools apart from regexps!

Hadley



More information about the textmate-dev mailing list