Skip to content

Instantly share code, notes, and snippets.

@RichNSD
Created May 17, 2023 17:10
Show Gist options
  • Select an option

  • Save RichNSD/23e4f91fb6e30a6560030163951dabda to your computer and use it in GitHub Desktop.

Select an option

Save RichNSD/23e4f91fb6e30a6560030163951dabda to your computer and use it in GitHub Desktop.
Markdown code block containing a highlighted code block in markdown syntax

Nested Code Blocks

To display the proper syntax for Markdown's fenced code blocks (with or without syntax highlighting) you need to use the HTML <pre> element, like so:

HTML Syntax

<pre lang="markdown">
<!-- JavaScript Code Block (Markdown Syntax) -->
</pre>

Markdown Output

```javascript
console.log('Hello, world!');
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment