Escape Markdown Code Block Inside Markdown Code Block

Show QR code Hide QR code
QR code linking to https://navendu.me/tils/13-11-24-escape-markdown-code-block-inside-markdown-code-block/

You can escape Markdown code blocks by using four backticks (````) instead of three.

> Prevent Go Programs from Exiting

This _can be prevented_ by wrapping your code with a **channel**:

```go
c := make(chan bool) // creates a new channel
// your code goes here
<-c // perpetually waits for the channel to receive data
```

The above code block documents a Markdown code block. Very meta. It is created use four backticks:

````markdown

Webmentions • Last updated at 10:43 AM, 4th December 2025

Have you written a response to this? Send me a webmention by entering the URL.