5

The C# highlighter (and possibly others) chokes on non-ASCII characters in class names, as can be seen in this post:

Trouble with if circulating

enter image description here

EDIT: Prettify bug report submitted.

2

A comment in the code the default parser marks it as a known shortcoming in Prettify:

fallthroughStylePatterns.push(
    // TODO(mikesamuel): recognize non-latin letters and numerals in idents
    [PR_LITERAL,     /^@[a-z_$][a-z_$@0-9]*/i, null],
    [PR_TYPE,        /^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/, null],
    [PR_PLAIN,       /^[a-z_$][a-z_$@0-9]*/i, null],
...

By "non-latin," I think it really means non-ASCII. Fixing it would involve changing not just the statement quoted above, but several places where patterns like a-z or a-zA-Z appear. Prettify does some case-folding as part of its processing of regular expressions, and I imagine that contributes to making this a non-trivial problem to solve.

1

While I agree that's a bug (and I agree with the comments...that's bad code as well), it's one that would need to be fixed on the prettify side. Given this is the first time I've seen this though, I wouldn't wager they'll fix it unless they can do so in a way that doesn't suffer performance-wise for this edge case.

Not the answer you're looking for? Browse other questions tagged .