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 254358 - Source > Format incorrectly indents for JSTL <c:when> with nested <li> elements
Summary: Source > Format incorrectly indents for JSTL <c:when> with nested <li> elements
Status: NEW
Alias: None
Product: web
Classification: Unclassified
Component: HTML Editor (show other bugs)
Version: 8.0.2
Hardware: All All
: P3 normal (vote)
Assignee: Milutin Kristofic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-14 07:42 UTC by brettryan
Modified: 2016-04-21 16:30 UTC (History)
0 users

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 brettryan 2015-08-14 07:42:12 UTC
Given the code

    <ol class="breadcrumb">
      <c:choose>
        <c:when test="${empty lineplan}">
          <li class="selected">Line Plans</li>
        </c:when>
        <c:otherwise>
          <li><a href="<c:url value="/product/lineplans"/>">Line Plans</a></li>
        </c:otherwise>
      </c:choose>
    </ol>

Invoking Source > format will result in:

    <ol class="breadcrumb">
      <c:choose>
        <c:when test="${empty lineplan}">
          <li class="selected">Line Plans</li>
          </c:when>
          <c:otherwise>
          <li><a href="<c:url value="/product/lineplans"/>">Line Plans</a></li>
          </c:otherwise>
        </c:choose>
    </ol>

Note this does not apply if the list elements are expanded as in the following:

    <ol class="breadcrumb">
      <c:choose>
        <c:when test="${empty lineplan}">
          <li class="selected">
            Line Plans
          </li>
        </c:when>
        <c:otherwise>
          <li>
            <a href="<c:url value="/product/lineplans"/>">Line Plans</a>
          </li>
        </c:otherwise>
      </c:choose>
    </ol>

Which formats correctly.

I have also tested with the 8.1 beta.
Comment 1 johannsig 2016-04-21 16:30:27 UTC
Would really like to see this addressed. I use Alt-Shift-F (Source>Format) ALL the time while writing JSPs and fixing indentations manually all the time tends to interrupt my work flow.