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.
Hello, It's juste a detail, but with this code example : before formatting : <div> <p> <hr /> </p> </div> after formatting (Alt + Maj + F) : <div> <p> <hr /> </p> </div> So, it would be better that lines before formatting not change after. However, with ' br ' tag, there is no problem. Thanks.
Thanks for filling the issue. It looks like the cause is the same as in the Bug 201125 - <tt> tag absorbs extra level of indentation in format source
The difference is that the <hr /> tag is an empty tag. But the result is indeed the same as the bug you 've say.
Indenter follows document's DTD. In this case it looks to me that <hr/> closes <p> tag and therefore closing </p> is invalid. That's what IDE editor validation says as well - closing </p> is underlined and marked as "No p element in scope" error. This formats as expected: <div> <p> <hr/> <p> </p> </div>
Before html5, yes, you're right. In html5, it's ambiguous. But in absolute, it's effectively better to use <hr /> tag out of the <p> tag. So, it's not really an issue. Thanks for your work and good luck.