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

<pre> HTML tag makes javadoc include space after asterisk

XMLWordPrintable

      A DESCRIPTION OF THE PROBLEM :
      The <pre> HTML tag makes javadoc include the space after asterisks:

      /**
       * Some doc
       * <pre>
       * String example = "";
       * int someValue = 1;
       * </pre>
       */
      public class MyClass { }

      Will result in the documentation (with leading spaces replaced with #):
      Some doc
      #String example = "";
      #int someValue = 1;

      As you can see the <pre> tag causes the space between the asterisk and the start of the code to be included. This is very likely in most cases not the wanted behavior.
      Examples for this can be seen in the documentation https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Throwable.html#initCause(java.lang.Throwable) where each code line is indented with a space.


        1. MyClass.java
          0.1 kB
        2. preTag.PNG
          preTag.PNG
          11 kB

            Unassigned Unassigned
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: