This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 129576

Summary: Reformatting of a JSP or HTML page removes all indentations in embedded JavaScript
Product: javaee Reporter: jsr <jsr>
Component: JSPAssignee: Martin Adamek <madamek>
Status: VERIFIED FIXED    
Severity: blocker CC: issues, mfukala, pjiricka, tslota
Priority: P1    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description jsr 2008-03-07 19:11:51 UTC
Reformatting of a JSP or HTML page that contains embedded JavaScript causes the JavaScript to lose all indentations.
Reformatting worked correctly with 6.0, but does not work right with 6.1 Beta 1. See the examples of 6.0 and 6.1 below.
Marking as a P1 due to being a regression.

Formatting with 6.0:
-----------
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
        <script>
            function test() {
                alert("test");
            }
        </script>
    </head>
    <body>
        <h2>Hello World!</h2>
    </body>
</html>



Formatting with 6.1 Beta 1:
-----------
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
        <script>
function test() {
alert("test");
}
</script>
    </head>
    <body>
        <h2>Hello World!</h2>
    </body>
</html>
Comment 1 Marek Fukala 2008-03-13 12:07:05 UTC
Martine, can you please evalue this one? May be related to your changes in js formatting. Reassign to Tomasz if not yours.
Comment 2 martin_adamek 2008-03-13 13:53:50 UTC
This is already fixed.
Comment 3 Jindrich Sedek 2008-04-22 14:49:38 UTC
verified.
NetBeans IDE 6.1 (Build 200804210003)