Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 158 Stack Exchange communities.

What is meta?
Here's how it works:
  1. Any Stack Exchange user can ask a question
  2. The community provides support, votes on ideas, and reports bugs
  3. Your voice helps shape the way Stack Exchange operates

This question already has an answer here:

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.

share|improve this question

marked as duplicate by ben is uǝq backwards, Rory, animuson, Lucifer, Hugo Dozois Jun 16 '13 at 4:55

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.

Don't work with whoever wrote that. – Mysticial Mar 7 '13 at 7:37
@animuson: done. – nneonneo Mar 7 '13 at 7:44

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

    // 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.

share|improve this answer

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.

share|improve this answer

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