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 201125 - <tt> tag absorbs extra level of indentation in format source
Summary: <tt> tag absorbs extra level of indentation in format source
Status: RESOLVED WORKSFORME
Alias: None
Product: web
Classification: Unclassified
Component: HTML Editor (show other bugs)
Version: 7.0.1
Hardware: PC Windows 7 x64
: P3 normal (vote)
Assignee: David Konecny
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-19 13:14 UTC by maverick.woo
Modified: 2012-04-24 02:02 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description maverick.woo 2011-08-19 13:14:08 UTC
It seems that the presence of <tt> absorbs an extra level of indentation. In the example below, the second </li> is one level too less indentation, so is the line with <tt> itself.

<ul>
    <li>
        OK
    </li>
    <li>
    <tt>NOT OK</tt>
</li>
</ul>
Comment 1 Marek Fukala 2011-11-04 19:41:25 UTC
take into account Bug 204693 - error formatting on ' hr ' tag
Comment 2 David Konecny 2012-04-24 02:02:44 UTC
Formatter follows document's DTD. If you specify your document to be of HTML 4, eg.:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

then formatting works fine. If you specify 

<!DOCTYPE HTML>

which means HTML5 then formatting gets broken because <tt> is not valid HTML5 tag.