Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Multiple code blocks have the code in different colors
On this question https://software.codidact.com/questions/279097 there are two code blocks, but the color of the text is different.
I directly copied and pasted the code so I don't see why some of the code would be red in the second block and not the first.
Is this a bug in how the code blocks are rendered?
1 answer
#NotABugForOnce
This is down to language guessing. If you don't tell the highlighter what language your code is in, it guesses. Sometimes, it guesses wrong, like here.
I've edited the post and added language hints, so they show the same now.
0 comment threads