This topic is about automatic code highlighting here on the forum. Like this:
void setup() {
// initialize digital pin LED_BUILTIN as an output.
pinMode(LED_BUILTIN, OUTPUT);
}
// the loop function runs over and over again forever
void loop() {
digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}
Looks pretty, right?
but sometimes we post things that aren't code in code blocks and they get detected as some random language and highlighted nonsensically:
I'd like to revisit this proposal and see what the community thinks about it now. The autohighlight all code feature was never disabled despite the poll results.
I still don't have a strong preference either way, but if the community wants it turned off I'm happy to do so.
How about a "preferred language" dropdown in the user profile with those settings and a list of the languages the autoformatter understands. I only post C++ because that's what Arduino mostly runs on.
Maybe have an override option if suddenly i want to post, say, APL (which is non ASCII).
Two weeks have passed. Even though we didn't receive any new feedback, the feedback we did receive indicates that forced highlighting is not wanted by the community so I have disabled it.
If you want highlighting of your code blocks, make sure to add the language identifier suffix on the opening code fencing markup: