Presidium Open Source

Markdown


Codeblocks

To add code blocks to your content, enclose the code with three backticks. For syntax highlighting, set the language directly after the first set of backticks. Alternatively, you can indent your code / machine output to treat it as preformatted text. For single line inline code, use a single backtick.

Javascript

var N = 32;
var buffer = new ArrayBuffer(N);
```js
var N = 32;
var buffer = new ArrayBuffer(N);
```

Python

my_array = [i for i in range(0, N)]
```py
my_array = [i for i in range(0, N)]
```

C

int * my_func(int * in) {
    return in;
}
```c
int * my_func(int * in) {
    return in;
}
```

Go

package main

import "fmt"

func main() {
    fmt.Println("hello world")
}
```go
package main

import "fmt"

func main() {
    fmt.Println("hello world")
}
```

Others

Github-flavoured Markdown supports many languages for code blocks. For a full list, go to Github.