<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><DIV><DIV>On Jun 23, 2005, at 11:17 PM, Allan Odgaard wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite"><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">On 24/06/2005, at 5.21, Charilaos Skiadas wrote:</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV> <BR><BLOCKQUOTE type="cite"><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">[...] the first star or underscore is also not preceded by an odd number of backslashes and the second symbol is not preceded by an even number of backslashes [...]</DIV> <BR></BLOCKQUOTE><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">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.</DIV></BLOCKQUOTE><DIV><FONT class="Apple-style-span" color="#0000DD"><BR class="khtml-block-placeholder"></FONT></DIV>Actually, thanks for using this as your example. It is a particularly elegant solution.<BR><BLOCKQUOTE type="cite"><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">So for example if we add this rule to markdown:</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><SPAN class="Apple-converted-space">    </SPAN>{ <SPAN class="Apple-converted-space">  </SPAN>name = "constant.character.escape.markdown";</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><SPAN class="Apple-converted-space">        </SPAN>match = "\\\\[-`*_#+.!(){}\\[\\]\\\\]";</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><SPAN class="Apple-converted-space">    </SPAN>},</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Then we don't have to do anything special for the *emphasis* rule to handle: \*not-emphasis* or the dozen variants of this (and it should work for all constructs).</DIV></BLOCKQUOTE><DIV><FONT class="Apple-style-span" color="#0000DD"><BR class="khtml-block-placeholder"></FONT></DIV>So this will not work as is for the closing *? I wonder, could we use a begin-end-swallow pattern instead of a match?<BR><BLOCKQUOTE type="cite"><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">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.</DIV></BLOCKQUOTE><BR></DIV><DIV><FONT class="Apple-style-span" color="#000000">Btw, I meant to say it earlier in relation to Brad's changes in the LaTeX bundle, but THANK YOU, THANK YOU, THANK YOU!!!</FONT></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV> <DIV>Haris</DIV><DIV><BR class="khtml-block-placeholder"></DIV> </DIV><BR></BODY></HTML>