Bug with Code Blocks

Hopefully this isn’t my browser being strange again, but there is an issue with the syntax highlighter, as can be visible by this post: http://www.java-gaming.org/topics/rendering-text-in-lwjgl-without-slick/35535/view.html
Can others see the red highlighting?

Yes, I can see that too. The highlighter is not recognising escaped double quotes. " is taken as the end of string.

Looks like the open single-quote.

Testing 1 2 3


Hello ' World This is
a
' Test

Yup it’s the single quote, not the double quote. The single quotes and contents proceeding should not be highlighted if there isn’t a closing single quote at most 1 character away (2 for escaped characters).

Both are the problems. Here is another test case (modified from original)


   private final Map<Integer,String> CHARS = new HashMap<Integer,String>() {{
        put(0, "ABCDEFGHIJKLMNOPQRSTUVWXYZ");
        put(1, "abcdefghijklmnopqrstuvwxyz");
        put(2, "0123456789");
        put(3, "ÄÖÜäöüß");
        put(4, " $+-*/=%\"''#@&_(),.;:?!\\|<>[]§`^~");
    }};
   
   //Variables
    private java.awt.Font font;
    private FontMetrics fontMetrics;

You see? The string ended there.

I noticed the same thing. As far as I know, this is a bug in SMF. Same thing happened at the LWJGL forum. I wonder if the SMF developers are aware of it. Otherwise perhaps an idea to send a bug report?

I wrote the java syntax highlighter, so it’s not a bug in SMF.