Test case:
class C
{
// \uu2028
}
This bug can be fixed by replacing the following code in file src/java/com/java2html/secondparse/JavaCharStream.java:
=====
// Here, we have seen an odd number of backslash's followed by a 'u'
try {
// Modified by JS - BEGIN
char c0 = ReadByte();
while ( (c = c0) == 'u') {
++column;
}
char c1 = ReadByte();
char c2 = ReadByte();
char c3 = ReadByte();
buffer[bufpos] = c = (char) (hexval(c) << 12 |
hexval(c1) << 8 |
hexval(c2) << 4 |
hexval(c3));
column += 4;
//System.out.println("Unicode, column="+column+",line="+line);
//remembers the positon & string of a /u9999 type character
unicodes.put(new Position(column, line), "" + c0 + c1 + c2 + c3);
// Modified by JS - END
by the following code:
=====
// Here, we have seen an odd number of backslash's followed by a 'u'
try
{
while ((c = ReadByte()) == 'u')
++column;
char c0 = c;
char c1 = ReadByte();
char c2 = ReadByte();
char c3 = ReadByte();
buffer[bufpos] = c = (char)(hexval(c0) << 12 |
hexval(c1) << 8 |
hexval(c2) << 4 |
hexval(c3));
unicodes.put(new Position(column, line), "" + c0 + c1 + c2 + c3);
column += 4;
}
=====
thanks, fixed this, and created a test case for it.
5 years late, but better late than never