title: Amend HTML Grammar based on attributes in TextMate
body: <p>I've recently started experimenting with jQuery Templates, which rely on your ability to wrap HTML within <code>SCRIPT</code> tags.</p>
  
  <pre><code>&lt;script id="movieTemplate" type="text/x-jquery-tmpl"&gt;
      &lt;li&gt;
          &lt;b&gt;${Name}&lt;/b&gt; (${ReleaseYear})
      &lt;/li&gt;
  &lt;/script&gt;
  </code></pre>
  
  <p>The problem is, TextMate naturally assumes that anything within <code>SCRIPT</code> tags is JavaScript. I'm sure it's possible to make TextMate treat the content differently based on the <code>type</code> attribute, but I'm struggling with some of the grammar being used in the bundle. I'm pretty confident that the line below is key, but I'm not sure where to start.</p>
  
  <pre><code>begin = '(?:^\s+)?(&lt;)((?i:script))\b(?![^&gt;]*/&gt;)';
  </code></pre>
  
  <p>Has anyone already dealt with a similar scenario? Would someone be able to point me in the right direction?</p>
  
  <p>Rich</p>