title: How do I remove comments from inside a "script" element but not the rest of the HTML?
body: <p>How do I only target comments inside of script elements, instead of all "double slash" comments, for example, this:</p>
  
  <pre><code>&lt;a href="https://www.example.com"&gt;Link to example.com&lt;/a&gt;
  &lt;script type="text/javascript"&gt;
    // I am a comment, I describe this script
    console.log("Hello World!");
  &lt;/script&gt;
  </code></pre>
  
  <p>Becomes this:</p>
  
  <pre><code>&lt;a href="https://www.example.com"&gt;Link to example.com&lt;/a&gt;
  &lt;script type="text/javascript"&gt;
    console.log("Hello World!");
  &lt;/script&gt;
  </code></pre>
  
  <p>So far I have this:</p>
  
  <pre><code>html = re.sub(re.compile(r"\/\/.*?\n"), "\n", html)
  </code></pre>
  
  <p>It works but it also removes my links in my <code>href</code> and <code>src</code> attributes.</p>