You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the problem?
1. Try typing code like `int x = 0b0110_0101;`
2. Prettify the code like normal.
3. See the issue.
(Please include HTML, not just your source code)
What is the expected output? What do you see instead?
In Java 7, a new feature was added to Java that allows underscores to be placed
within numeric literals in order to improve the readability of them. However,
the Java code highlighting in Prettify is not properly treating numeric
literals with underscores as numeric literals.
Right now, Java numeric literals show up as red to stand out from what
surrounds it. However, when an underscore is used in such a numeric literal,
only the part to the left of the first underscore is highlighted as red; the
rest of the number is just black. Whenever this new feature is used in Prettify
code, it should be the entire numeric literal that is highlighted, not just the
first part of it.
What version are you using? On what browser?
I'm using the Stack Overflow (http://stackoverflow.com/) implementation of
Prettify, on Internet Explorer 11.
Please provide any additional information below.
Relevant Meta Stack Overflow question:
http://meta.stackoverflow.com/questions/272508/java-code-highlighting-does-not-s
upport-underscores-in-numeric-literals
Oracle documentation for underscores in literals:
http://docs.oracle.com/javase/8/docs/technotes/guides/language/underscores-liter
als.html
Original issue reported on code.google.com by [email protected] on 30 Sep 2014 at 7:10
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
[email protected]
on 30 Sep 2014 at 7:10The text was updated successfully, but these errors were encountered: