This question already has an answer here:

I think Markdown google-code-prettify has some incorrect lexical rules for Java (and possibly other languages).

It correctly identifies this code block from SO question 1485832 as being written in Java:

float tamaño = texto.Tamaño;
double tan = texto.Orientacion.Y / texto.Orientacion.X;

but as you can see, the syntax highlighting of one of the identifiers is messed up. I am guessing that it does not consider the non-ASCII character 'ñ' to be part of an identifier, whereas Java itself does consider it to be part of the identifier.

marked as duplicate by ben is uǝq backwards, ChrisF Jun 16 '13 at 10:00

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    I'd love to support i18n identifiers properly, but JS doesn't have support for unicode character classes. Replacing every \w in a regex with several kB of unicode character ranges would bloat the download. If you have any ideas about how to support i18n identifiers without exploding download sizes, I'd love to here them. – Mike Samuel Dec 10 '09 at 18:27

Submit a patch! :)


We just deployed the latest trunk of prettify.js ; revision 83