Java multiline comments are not parsed correctly by the highlighter in certain cases and this
results in the syntax highlighting of code and comments being mangled. I have only tested
the below code in ST2 and ST3 beta on OSX.
A screenshot of the code in ST3 is up at imgur.com/2RHoeEA.
public class Test {
/**
* This is a clean
* comment block.
*/
/**
* This is a <malformed">
* comment highlighting
*/
public static void main(String] args){
func1();
return;
}
/**
* ">
*/
public static void func1(){
System.out.println("Hello World!"); func2();
return;
}
/* This is not <malformed"> */
public static void func2(){
System.out.println("Hello 2 you"); func3();
return;
}
/**
* <notmalformed">
* comment highlighting
*/
public static void func3(){
System.out.println("Hi Th3r3"); func4();
return;
}
/*
* Not<malformed">
* comment highlighting
*/
public static void func4(){
System.out.println("Function 4 you"); func5();
return;
}
/**
* Something <strange">
* happens
*/
public static void func5(){
System.out.println("When I"); func6();
return;
}
// ">
public static void func6(){
System.out.println("do this.");
return;
}
}
The code compiles and runs just fine.
$ javac Test.java
$ java Test
Hello World!
Hello 2 you
Hi Th3r3
Function 4 you
When I
do this.