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

Remove incidental whitespace in pre/code content

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P3 P3
    • 25
    • 11
    • tools
    • None
    • In Review
    • generic
    • generic

      In HTML5, a leading newline character is ignored if it immediately follows a <pre> element start tag[1].

      [1] https://html.spec.whatwg.org/#the-pre-element:syntax

      Unfortunately, this does not apply when the newline character is preceded by a <code> or {@code tag, resulting in an leading blank line in the generated output.

      DocCommentParser should take care of this very common case by removing a newline immediately following a <code> or {@code tag at the beginning of <pre> element content.

            hannesw Hannes Wallnoefer
            hannesw Hannes Wallnoefer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: