28 lines
675 B
Markdown
28 lines
675 B
Markdown
|
---
|
||
|
title: Code samples
|
||
|
tags: [formatting]
|
||
|
keywords: dcode samples syntax highlighting
|
||
|
last_updated: July 3, 2016
|
||
|
datatable: true
|
||
|
summary: "You can use fenced code blocks with the language specified after the first set of backtick fences."
|
||
|
sidebar: mydoc_sidebar
|
||
|
permalink: mydoc_code_samples.html
|
||
|
folder: mydoc
|
||
|
---
|
||
|
|
||
|
## Code Samples
|
||
|
|
||
|
Use fenced code blocks with the language specified, like this:
|
||
|
|
||
|
```js
|
||
|
console.log('hello');
|
||
|
````
|
||
|
|
||
|
**Result:**
|
||
|
|
||
|
```js
|
||
|
console.log('hello');
|
||
|
```
|
||
|
|
||
|
For the list of supported languages you can use (similar to `js` for JavaScript), see [Supported languages](https://github.com/jneen/rouge/wiki/list-of-supported-languages-and-lexers).
|