From mailinglist@textmate.org Mon Jun 16 04:30:03 2008 From: Allan Odgaard To: textmate@lists.macromates.com Subject: [TxMt] Re: Setting up syntax highlighting for python scripts embedded in xml files Date: Mon, 16 Jun 2008 06:30:01 +0200 Message-ID: <20AE5937-649D-4DE1-A592-C0DA2F5EFF5F@textmate.org> In-Reply-To: <1213485903.10344.1258488825@webmail.messagingengine.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8942416857267354570==" --===============8942416857267354570== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit On 15 Jun 2008, at 01:25, Pedja wrote: > [...] I was trying to set this up for XML so I can have proper > syntax highlighting for python. So far, though, I have not had any > luck with this. I tried adding the following in the xml language > definition, both right after the section for embedded java and, when > that didn't work, right after the section for CDATA comments, but it > doesn't seem to work: Adding _after_ the more general rule e.g. for CDATA, when you match CDATA, is not going to work. It is the first rule in the grammar which matches a construct, which wins. > { name = 'source.python.embedded.xml'; > begin = '\s*? end = ']]>\s*?