Decimal numbers don't get number theme coloring

Problem description:
When using the new theme create feature, numbers like 2 get the correct colors, but 2.2 does it.

Expected behavior:
I would expect both types of numbers to get the same colors so 2 and 2.2 look the same.

Steps to reproduce:
Create a custom theme. Write some code using an integer number and a decimal number.

Browser/OS/Device:
Chrome, MacOS

2 Likes

Hey @27whs223,

it works perfectly for me!

1 Like

it doesn’t work for me (at least in java).
the int values in the default dark theme are greenish-yellow like they should be, but anything with a decimal point is white like normal text.

copy and paste this java code into a repl:

///NOTE:
//START JAVA CODE
class Main {
  public static void main(String[] args) {
    System.out.println("Hello world!");
    convert(1.1, 32); //syntax highlights seems to be different in replies in forums.

  }
  public static double convert(double a, double b){
    return (a + b + 3 + 3.5);
      
  }
}
//END JAVA CODE
1 Like

@hugoondev which language are you programming in? I’m only familiar with java.

Played around with the theme editing interface, and I can confirm it works in C++, Python and even JavaScript, but not Java.

1 Like

This is still an issue in java. Make a java repl calling methods or using equations with decimal numbers and they still don’t get highlighted like a number value (but integers without decimals are still highlighted properly).

Also, is it intentional that there’s no longer any syntax highlighting for regEx stuff? It used to be highlighted pink (in dark mode), and it’s in the custom theme editing interface. I don’t think this is a java-only thing, either.

1 Like

Decided to ping IanAtReplit since he knows java and is a staff member.

This problem is assigned to Shane and he is working on it.

2 Likes

Hey @possibleFuture!

We are looking into this.

1 Like