How can I preven IntelliJ's JavaDoc formatting from removing my indentations

Viewed 934

Here is a javadoc comment that I wrote:

  /**
   * This utility allows the user to do the following.
   * <ul>
   *   <li>A cool feature</li>
   *   <li>Another cool feature</li>
   * </ul>
   */
  public static void main(String[] args) {

Here is the same comment, reformatted by intelliJ

  /**
   * This utility allows the user to do the following.
   * <ul>
   * <li>A cool feature</li>
   * <li>Another cool feature</li>
   * </ul>
   */
  public static void main(String[] args) {

How can I prevent the autoformat feature from clobbering my intentations?


In order to prevent IntelliJ from removing my newlines, I checked a box:

Settings > Editor > Code Style > Java > JavaDoc > Preseve Line Feeds

I wish there was a "Preseve leading whitespace" box in the same place, but there isn't.

0 Answers
Related