(Cross-posted as a bug report to MSE which lists all affected languages found thus far. Please go there to see if a language you've observed being labeled incorrectly is included in the table)
I just loaded a question and saw what I assume is a new feature in code blocks where the site tells us at a glance what it thinks the language is in said code block:
This question is tagged html and the actual code fences explicitly state the code is HTML as well:
This might just be specific to HTML/XML, since other questions tagged, e.g. java seem to 'guess' correctly. The question where I saw this is: Name attribute on details element
Can this please be fixed to not guess at the very least when the language is explicitly stated in the code fences, and preferably also not when a (single) language tag is used in the question?
(Or better yet, if you think you detect a language that is not tagged in the question, prompt the user to confirm whether that language is correct before allowing them to post the question, and if not, change the guess or auto-add the language tag. That would save on a fair amount of "you can't close this question as a duplicate with your gold badge because the question didn't have the correct language tag beforehand).
Another example: An r/python question that autodetects different code blocks as Haskell, Sass, and Rust: Find locations with the same travel time to a destination: Heatmap/Contours based on transportation time (Reverse Isochronic Contours):




html? Maybelang-htmlisn't a known language and then it guesses.<!-- language: lang-html -->with the new code fences style. Also, annoyingly, the language guesser doesn't show up in post previews, only the main view once the edit is saved, so I can't test without... actually changing the content, which I want to avoid for this bug report, at least.cpp, even though[c++]is the real tag and[cpp]is just a synonym of[c++].