I got tired of the buggy, CPU hogging Javascript syntax highlighter.
Hence I wrote some horrific PHP that spits out:
/*
* multi-line comment
*/
public class Test {
public static final double WAY_TOO_MUCH = 25.4f;
public static final long[] DISARRAY = {-1, 1, 2L, 0xf3L};
public volatile Map<String,
Map<Integer,double>> lastNameToAgeToCreditRating;
/**
* Javadoc
*/
@Annotation(14)
@Annotator("fourteen")
public static void main(String[] args) throws IOException {
// single line comment
try {
char secret = 'X';
int requested = 5;
int offered = Integer.parseInt(args[0]);
@@ if(offered > WAY_TOO_MUCH) { // I prefixed the line with @@ to trigger the highlight
System.out.println("get off my "+args[(int)DISARRAY[offered]]+"!");
}
else {
System.out.println("hm. kay.");
}
}
finally {
System.out.println ("thx.");
}
}
}
it’s far from flawless, and you guys will easily break it, if only due to failing to comply with java naming conventions