10

Possible Duplicate:
Why isn't syntax highlighting working in a question?

For some reason, the code here is not getting syntax-highlighted. Perhaps it's a problem with my browser/cache or something? Or maybe I'm doing something wrong?

If I remember correctly, usually keywords like class and public get highlighted, this isn't happening in the answer I linked.

0

1 Answer 1

12

Syntax highlighting is dependent on the language. By default that is chosen from the tags that are on the question. However, the question doesn't have any languages tagged. So there's no syntax highlighting.

I've edited your post to manually enable C++ syntax highlighting by adding this:

<!-- language: lang-cpp -->

More Information: Syntax highlighting language hints

7
  • But that doesn't work !!!!!!! Dec 22, 2013 at 11:43
  • What doesn't work? Can you link me an example where it failed?
    – Mysticial
    Dec 22, 2013 at 11:45
  • 1
    You needed a line break before that tag. Fixed it for you. :)
    – Mysticial
    Dec 22, 2013 at 11:53
  • Oh before, damn I searched everywhere and I couldn't figure it out and it pissed me off, at least now I know :) thanks a lot! Dec 22, 2013 at 11:56
  • Should mark this as accepted.
    – Eric
    Oct 26, 2018 at 7:36
  • Or simply: <!-- language: go -->
    – Eric
    Apr 19, 2023 at 8:46

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