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.
When i used code formatting in latte file, then HTLM and CSS was been formatted correctly but javascript was been shifted, as you may seen on example. Exist one solution, what i know. Remove the initial javascript tag, run automatic formating (javascript code will be moved to left), insert back initial javascript tag and run automatic formating. At the moment, the code will be formatted correctly. But when we will use formating again, the code will be shifted. When i previously was using Netbeans version 6.2, the code formatting worked correctly Example: {literal} --HTML over javacript-- <script type="text/javascript"> $(function() { $(".ajaxPermission").off("click").on("click", function() { var id = $(this).attr("data-id"); var status = $(this).attr("data-status"); //Do somethings }); $(".resourceName").off("click").on("click", function() { var bullet = $(this).find(".toggle"); var data = $(this).parent().children(".resourceData"); if (bullet.hasClass("icon-bullet_toggle_plus")) { bullet.removeClass("icon-bullet_toggle_plus").addClass("icon-bullet_toggle_minus"); data.show(); } else { bullet.removeClass("icon-bullet_toggle_minus").addClass("icon-bullet_toggle_plus"); data.hide(); } }); }); </script> --HTML below the javascript-- Product Version: NetBeans IDE 7.4 (Build 201310111528) Updates: NetBeans IDE is updated to version NetBeans 7.4 Patch 2 Java: 1.7.0_45; Java HotSpot(TM) Client VM 24.45-b08 Runtime: Java(TM) SE Runtime Environment 1.7.0_45-b18 System: Windows 8 version 6.2 running on x86; Cp1250; cs_CZ (nb)
Attach a whole sample file (not just snippet from the middle of the file), where one can invoke formatting and the result will be wrong and reopen. Thanks.
Created attachment 144148 [details] Javascript formatting example
Created attachment 144149 [details] Sample file Another sample file without latte
I also tried this file (no latte inside - just html and js) and JS formatting (indenting) doesn't work. Same source works well in HTML file. Petre, can you look at it? LatteIndenter is not invoked on that source.
I tried your example file and JS formatting (indenting) doesn't work(output was the same as the my first example). When i moved code to HTML file and launched formatting, then the output was correct. Have you any explanation for this problem?
I tried formatting of both examples by reporter (with latte) and by Ondra (without it) and both seems to be formatted correctly in daily build. Can you please verify?