Skip to content

(Java) braceless else statement highlights code differently #3454

@Aster89

Description

@Aster89

Describe the issue

<pre><code class="language-java">int a = l;
if ( O == l )
  l = O1;
else {
  a = 01;
}</code></pre>

is shown as
with-braces
whereas if I remove the { and }, it is shown as
without-braces

Honestly, I don't if also the coloring of the a on the first line is a mistake. Probably it is.

Which language seems to have the issue?
Java

Are you using highlight or highlightAuto?

Not sure if it's an answer, but I've downloaded it (yesterday) form here, so I think I'm using highlight.

Sample Code to Reproduce
See snippet above and this.

Expected behavior
See screenshot above

Additional context
Not sure what else is needed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions