Skip to content

(java) Scientific notation numbers are only legal for floating points #2508

@0xflotus

Description

@0xflotus

Describe the issue

HighlightJS highlights illegal number literals

Which language seems to have the issue?

java

Are you using highlight or highlightAuto?

highlight

Sample Code to Reproduce

Case a and b should be illegal, case c and d are fine.

https://jsfiddle.net/e1xnqskb/

a = 2e4L;
b = 2e3l;
c = 2e3f;
d = 1.2e4D;

Expected behavior

I would expect that illegal number literals are not highlighted

Additional context

It's a similar issue to #2507

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