function test() {
console.log("notice the blank line before this function?");
}
<pre><code>
function test() {
console.log("notice the blank line before this function?");
}
</code></pre>> [!TIP]
> To preserve your formatting within a list, make sure to indent non-fenced code blocks by eight spaces.<blockquote class="markdown-alert markdown-alert-tip">
<p><strong>Tip</strong></p>
<p>To preserve your formatting within a list, make sure to indent non-fenced code blocks by eight spaces.</p>
</blockquote> ````
```
Look! You can see my backticks.
```
```` <pre><code>
```
Look! You can see my backticks.
```
</code></pre>require 'redcarpet'
markdown = Redcarpet.new("Hello World!")
puts markdown.to_html<pre><code class="language-ruby">
require 'redcarpet'
markdown = Redcarpet.new("Hello World!")
puts markdown.to_html
</code></pre>The
language-rubyclass is consumed by GitHub’s syntax highlighter (Linguist + grammar).
| Markdown fence | Parsed <code> tag |
|---|---|
| ```js | <code class="language-js"> |
| ```html | <code class="language-html"> |
| ```md | <code class="language-md"> |
| ``` (no lang) | <code> |
<!-- Internal documentation comment --><!-- Internal documentation comment -->[About writing and formatting on GitHub](https://docs.github.com/...)<a href="https://docs.github.com/...">About writing and formatting on GitHub</a>* [GitHub Flavored Markdown Spec](https://github.github.com/gfm/)<ul>
<li>
<a href="https://github.github.com/gfm/">GitHub Flavored Markdown Spec</a>
</li>
</ul>```mermaid
graph TD
A --> B
```<pre><code class="language-mermaid">
graph TD
A --> B
</code></pre>- No
language-*class appears here because no language identifier was provided. - The inner triple backticks are preserved as literal text inside
<code>.