Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8002387

Improve rendered HTML formatting for {@code}

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2
    • Resolution: Fixed
    • Affects Version/s: 8
    • Fix Version/s: 8
    • Component/s: tools
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b91
    • CPU:
      generic
    • OS:
      generic
    • Verification:
      Verified

      Description

      Multi-line blocks of example code within:

      <pre>{@code
      line1...
      line2...
      line3...
      }</pre>

      are indented differently than when put in just <pre></pre>. In particular, the first line is not indented.

      For an example of the problem, see example.txt for the JavaDoc and rendered .html, and screenshot.png for how this looks in the browser.

      I believe this could be fixed if the line break following <pre>{@code were carried over to the .html. For example:

       <pre><code>DateFormat preCode = DateFormat.getDateInstance();

      would become:

       <pre><code>
      DateFormat preCode = DateFormat.getDateInstance();

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jjg Jonathan Gibbons
                Reporter:
                bchristi Brent Christian
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: