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

Improve rendered HTML formatting for {@code}

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2
    • 8
    • 8
    • tools
    • b91
    • generic
    • generic
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: