Sign in or register
You'll be able to write comments and posts, like content, and much more
Search
Dark theme

Syntax highlight in preformatted text

Write language name after triple backticks (```) and content of preformatted text will be highlighted.
This is example:
 ``` ts
 let projectName: string|null = null;
 projectName = 'Famabara';
 ```
Of course, you shouldn't start backticks-line with a space.

Golang syntax highlight example:
package main

import "fmt"

func main() {
	fmt.Println("Hello, from Go!")
}

Javascript syntax highlight example:
console.log(2**2**3); // 256
console.log(2**(2**3)); // 256
console.log((2**2)**3); // 65

SQL example:
SELECT p.id, p.title FROM posts p LIMIT 10;

For C++ write "cpp", not "c++".
For C# write "csharp", not "c#"

Famabara uses highlight.js for syntax highlight.
+2
52
0
There are no comments yet