DArtagnant / blueJ-code-highlighter

format java code in html, imitating the style of the blue-J IDE
GNU General Public License v3.0
1 stars 0 forks source link

Incorrect indent when `if` just after a function declaration (without blank line) #14

Closed DArtagnant closed 4 months ago

DArtagnant commented 4 months ago

image Like this code, the indentation is not correct.

The correct one is :

public String getItemString() {
  if (this.aInventory.isEmpty()){
    return "Il n'y a point d'objets intéressants à l'horizon.";
  }
}

Originally posted by @blastegit in https://github.com/DArtagnant/blueJ-code-highlighter/issues/12#issuecomment-2153089405

DArtagnant commented 4 months ago

temporary solution: add a blank line between the function declaration and the if