How to display code blocks in Medium
Joey Yang

Another note: if you paste code and then then covert it using this method, your regular double quotes will turn into “smart” quotes, that are aware of if they are opening or closed quotes. This can fuck up things like regex where you are working with regular “one-sided” double quotes.

To get around this problem, create a code-block first, of some written code or words to delete later, and THEN paste the code containing the regular double quotes you want to preserve.

Sorry for speaking so slowly (I had to narrate it after recording it!) I hope RecordIt adds voice over

Here’s a complete way to do it using this quick regex tool that converts “smart” quotes into regular double quotes:

Like what you read? Give Aymon Fournier a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.