2

This is 50/50 for here or SO. Apologies if I got it wrong...

I've got a custom SO stylesheet which makes the background black (I don't like screen glare at night).

There's a minor issue styling code blocks.

This question works fine...

Working

Wherease this one doesn't

Broken

The original source for the working one is <pre><code> (as in the broken one) but somewhere along the way, it's updated to be <pre class="lang-cs prettyprint prettyprinted" style="">

Am I correct in assuming it's because prettify couldn't identify the language?

1 Answer 1

2

Your first example is inheriting the syntax highlighting from the tag on the question. Your second example does not inherit any syntax highlighting because none of the tags on the question have any highlighting language attached to them. To get highlighting, the question will need to have a tag that has a highlighting language attached to it, or you will need to manually specify a language hint for it to use.

Read more: What is syntax highlighting and how does it work?

You must log in to answer this question.

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