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.
I have this piece of code: <div><div><h1></h1></div></div> <div>TODO write content</div><div></div><script src="Scripts/functions.js"></script> both lines are code in one line, I copied and pasted this so after this I wanted to format those code so I typed my hotkey (ctrl + k, ctrl + d) but nothing happened. I tested right click -> format, the same, nothing happened. This test was inside an html file. After some brain celling, I tested it inside an xml file and inside this file, everything is working. After type my hotkey or over the context menu, I got this code: <div> <div> <h1></h1> </div> </div> <div>TODO write content</div> <div></div> <script src="Scripts/functions.js"></script> what is correct and what I expected inside an html or xthml file. Regards Chris
Reproducible. Formatting HTML (and CSS as well) is not adding new lines (I tried 7.1 with same result). Workaround is to put the new lines manually and then let formatter to fix indentation. Product Version: NetBeans IDE Dev (Build 201501120001) Java: 1.8.0_25; Java HotSpot(TM) Client VM 25.25-b02 Runtime: Java(TM) SE Runtime Environment 1.8.0_25-b17 System: Linux version 3.13.0-35-generic running on i386; UTF-8; en_US (nb)
Maybe JS as well too, didn't test it whether it's already working or not.
JS does break lines :)
Yes, this is caused by fact that Netbeans doesn't have Html Formatter. It can just indent code - moving beginning of lines. There is already enhancement for this, so I made this as duplicate of this enhancement. Thank you for reporting. We should fix this issue before next version *** This bug has been marked as a duplicate of bug 175028 ***