Member-only story
Medium’s New Code Blocks Need Fixing
# Please
2 min readNov 29, 2022
You’ve probably noticed this if you write technical articles on Medium that require you to write code. For instance:
print('hello world')
For those of you who are not familiar with this, hit either
- Command-Option-6 for MacOS
- Control-Alt-6 for Windows
And a code block will appear.
Old Code Blocks VS New Code Blocks
Old Code Blocks
- only 1 colour (black)
- we couldn’t hit tab to add multiple spaces
New Code Blocks
- Different colours for different keywords for different programming languages
- What programming language you’re using can be auto-detected (or chosen manually)
- We can input multiple spaces now using the tab key which is nice (previously we had to hit space multiple times)
The Problem
The programming language detection sucks.
Which means that we have to MANUALLY change the programming language of each block.
Next, I’m going to write a bunch of Python code without manually changing the detected language.