itdiy / google-code-prettify

Automatically exported from code.google.com/p/google-code-prettify
Apache License 2.0
0 stars 0 forks source link

Incorrect highlighting of keyword in Java #184

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. create simple code
<pre class="prettyprint"><code class="language-java">
public void foo() {
   int[] last = { 1, 4, 3, 2 };
   Arrays.sort( last );
   System.out.println( "last=" + Arrays.toString(last) );
}
</code>
</pre>
(Please include HTML, not just your source code)

What is the expected output?  What do you see instead?
word "last", "System", "out" and "Arrays" are not highlighted as keywords

What version are you using?  On what browser?
Firefox (9.0.1) + Chrome (16.0.912.75 m)

Please provide any additional information below.
List of java keywords is listed at 
http://docs.oracle.com/javase/tutorial/java/nutsandbolts/_keywords.html
Screenshot attached.

Original issue reported on code.google.com by betlista@gmail.com on 19 Jan 2012 at 9:34

Attachments:

GoogleCodeExporter commented 9 years ago
used on codeforces page, not sure what is the version of the library
http://codeforces.com/blog/entry/499

Original comment by betlista@gmail.com on 19 Jan 2012 at 9:41

GoogleCodeExporter commented 9 years ago
"next" is incorrectly highlighted in tests
http://google-code-prettify.googlecode.com/svn/trunk/tests/prettify_test.html#ja
va

Original comment by betlista@gmail.com on 19 Jan 2012 at 9:52

GoogleCodeExporter commented 9 years ago
<pre class="prettyprint java"> or <pre class="prettyprint lang-java"> is not 
working too :-(

Original comment by martin.s...@gmail.com on 19 Jan 2012 at 11:18

GoogleCodeExporter commented 9 years ago
This seems to be fixed in the most recent version.

Screenshot attached.

Original comment by mikesamuel@gmail.com on 30 Mar 2012 at 4:55

Attachments:

GoogleCodeExporter commented 9 years ago
As you can see in that screenshot, "System" are "Arrays" are correctly 
highlighted as types.  "last" is not highlight, and the keywords "public", 
"void", and "int" are correctly recognized as java  keywords.

Original comment by mikesamuel@gmail.com on 30 Mar 2012 at 4:56