Subject: bug#7204: html-mode do not match { } when there is a if with <

From: Guy Leblanc <[email-masked]>
Date: Tue, 12 Oct 2010 17:08:25 -0400

GNU Emacs 23.2.1 (i386-mingw-nt5.1.2600) of 2010-05-08 on G41R2F1
It is an unmodified Emacs.

Code with the problem

<!-- Begin of the file with the bug -->

<html>
<head>
<title></title>
<script type="text/javascript">

      function test(){
        aVar = 2;
        if (aVar < 5){ //  This is the problematic if 
          alert("Test();");
        }
      } //   If you remove } and add again } emacs tell you Mismatched 
parenthesis
    
</script>

</head>
<body>
  Hello world!
</body>
</html>
<!-- End of the file the bug -->

<!-- Begin of a file without problem-->

<html>
<head>
<title></title>
<script type="text/javascript">

      function test(){
        aVar = true;
        if (aVar){
          alert("Test();");
        }
      } // <--  If you remove } and add again } emacs can match parenthesis
    
</script>

</head>
<body>
  Hello world!
</body>
</html>
<!-- End of a file without problem -->