5
\$\begingroup\$

I don't know how it was decided which language to use when coloring the code blocks, but (on the main site) I assume it figured out it was C++ since it generally works OK. But, this line broke it. It thinks the ' is an opening quote I guess, since everything is uniform red after the binary literal.

for (uint8_t mask= 0b1000'0000; mask; mask>>=1) {

Ref: C++17 §5.13.2

Besides noting that this is probably out of date since C++ has a new standard, I wonder if there are ways to guide/override the coloring?

\$\endgroup\$
6
\$\begingroup\$

The language syntax highlighting used in Code Review (normally) comes from the language tag set on the post. This is one of the reasons we have only one language tag per post.

The language syntax highlighting is done through a prettify script that is used in all code-related Stack Exchange sites.

The "definitive" guide is here: What is syntax highlighting and how does it work?

As per those instructions, this is an issue that should be taken up on the actual prettify code's support process. Just looking around in their repo, it is not supported: https://github.com/google/code-prettify

\$\endgroup\$

You must log in to answer this question.

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