title: JQuery - SyntaxError: missing formal parameter
body: <p>I am using this to find all registered trademark symbols and tm symbols and wrap them in a sup tag with a class. I looked around since there is a couple people who have already asked the question, but none seem to fix my problem. Here is the code</p>
  
  <pre><code>$('body :not(script,sup)').contents().filter(function(){
      return this.nodeType === 3;
  }).replaceWith(function() {
      return this.nodeValue.replace(/[™®]/g, '&lt;sup class="registermark"&gt;$&amp;&lt;/sup&gt;');
  });
  </code></pre>
  
  <p>The error is happening on the first line</p>
  
  <pre><code>$('body :not(script,sup)').contents().filter(function(){
  </code></pre>