What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 131 Stack Exchange communities.

http://stackoverflow.com/review/suggested-edits/2331277

Wasn't sure why this suggested edit was necessary. The only tag is so I thought this should be picked up by our algos.

Tagging as bug but it may be a feature request.

share|improve this question

1 Answer 1

up vote 6 down vote accepted

The problem with is twofold:

  1. It corresponds to the default language hint because it's often used with other tags such as and . The default hint is used to allow prettify to highlight code blocks automatically, preventing clashes between different languages in the same post.

  2. In answer to the question title: prettify does not auto-detect CSS code blocks correctly, and so never automatically highlights CSS code blocks as such. It highlights using the parsing rules set out by the default hint, which is not compatible with CSS.

Since prettify cannot reliably automatically highlight CSS snippets, we have to tell it explicitly to do so. When you see edits adding lang-css hints appropriately, feel free to approve them. Otherwise, sadly, this can't be easily remedied because of point 1.

We could change it so that corresponds to lang-css, but that would break questions containing snippets in other languages such as and which also use default hints, for the reason stated in point 1.

This issue is further explored here: What's happening to syntax highlighting for [css] questions?

share|improve this answer

You must log in to answer this question.

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