title: Improve GeSHi syntax highlighting for T-SQL
body: <p>I'm using <a href="https://wordpress.org/plugins/wp-geshi-highlight/" rel="noreferrer">WP-GeSHi</a> in WordPress, and largely I'm very happy with it. There are, however, a few minor scenarios where the color highlighting is too aggressive when a keyword is:</p>
  
  <ol>
  <li>a variable name (denoted by a leading <code>@</code>)</li>
  <li>part of another word (e.g. <code>IN</code> in <code>INSERTED</code>)</li>
  <li>the combination (part of a variable name, e.g. <code>JOIN</code> and <code>IN</code> in <code>@JOINBING</code>)</li>
  <li>inside square brackets (e.g. <code>[status]</code>)</li>
  </ol>
  
  <p>Certain keywords are case sensitive, and others are not. The below screenshot sums up the various cases where this goes wrong:</p>
  
  <p><img src="https://i.stack.imgur.com/LpOib.png" alt="enter image description here"></p>
  
  <p>Now, the code in <code>GeSHi.php</code> is pretty verbose, and I am by no means a PHP expert. I'm not afraid to get my hands a little dirty here, but I'm hoping someone else has made corrections to this code and can provide some pointers. I already implemented a workaround to prevent <code>@@ROWCOUNT</code> from being highlighted incorrectly, but this was easy, since <code>@@ROWCOUNT</code> is defined - I just shuffled the arrays around so that it was found before <code>ROWCOUNT</code>.</p>
  
  <p>What I'd like is for GeSHi to completely ignore keywords that aren't whole words (whether they are prefixed by <code>@</code> or immediately surrounded by other letters/numbers). <code>JOIN</code> should be grey, but <code>@JOIN</code> and <code>JOINS</code> should not. I'd also like it to ignore keywords that are inside square brackets (after all, this is how we tell Management Studio to not color highlight it, and it's also how we tell the SQL engine to ignore reserved words, keywords, and invalid identifiers).</p>