Robot Not a Dev? Pre-order Now
Not a Dev?

Code Highlighting


#1

There has always been way to show code on this forum using Pre-Formatted text (hitting the </> icon in the editor, however, that would not highlight syntax correctly. To do that you had to use triple tics ```

I’ve changed the button in the editor now to do that by default as I figured that would be the main use case for pre-formatted text here—sharing code. One other tip: sometimes the code highlighter doesn’t grab the first line. I’ve found it works better to start highlighting code on a newline before the code starts.


#2

Thanks!

Also worth noting that you can still use monospace styling in-line (without syntax highlighting) by placing a word or phrase inside single tics (`).