Skip to content

(JAVA) Does not highlight the reserved keyword goto #3962

@alvinsjoy

Description

@alvinsjoy

Describe the issue
The goto keyword is actually reserved in Java but it's not used and has no functionality. Highlight.js does not highlight the reserved keyword goto.
Image below shows the demo page of the highlight.js website.
image
You can see that goto is not highlighted.
Whereas the image below shows how goto is highlighted in the Visual Studio Code editor.
image

Which language seems to have the issue?

Java

Are you using highlight or highlightAuto?

highlight

Sample Code to Reproduce

As goto is actually a useless keyword, you can just type in goto after selecting the language as Java.

Expected behavior

As you can see the screenshot of Visual Studio Code editor above, the goto function must be highlighted.
Additional context

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