Code Blocks
You can syntax highlight code from a small set of languages.
Language |
Syntax Name |
JavaScript |
JavaScript |
Markdown |
Markdown |
Lua |
Lua |
C++ |
C++ |
C# |
CSharp |
The list can be expanded on
request.
If you don't select a language, the pages default will be used.
Garry's Mods wiki pages default to Lua
for example
Lua
```Lua
function print( values )
player.say( 'hello' .. values )
end
```
function print( values )
player.say( 'hello' .. values )
end
Markdown
```Markdown
# H1
## H2
### H3
#### H4
##### H5
###### H6
Description with **bold** & *italic* text.
| Left | Center | Right |
|:-----|:------:|------:|
| Cell | Cell | Cell
```
Description with **bold** & *italic* text.
| Left | Center | Right |
|:-----|:------:|------:|
| Cell | Cell | Cell
HTML
```HTML
<html>
<!--
Multiline Comment
-->
<head>
<title> Title </title>
<style>
div[ data-attribute = value ]{
color : red ;
}
</style>
<script type = module >
const { debug } = console
debug('Hello World')
</script>
</head>
<body>
<div data-attribute = value >
Div with Text
</div>
</body>
</html>
```
<html>
<head>
<title> Title </title>
<style>
div[ data-attribute = value ]{
color : red ;
}
</style>
<script type = module >
const { debug } = console
debug('Hello World')
</script>
</head>
<body>
<div data-attribute = value >
Div with Text
</div>
</body>
</html>
JavaScript
```JavaScript
const { debug } = console
debug('Hello World')
```
const { debug } = console
debug('Hello World')
C#
```CSharp
namespace HelloWorld {
class Hello {
static void Main( string [] args ){
System.Console.WriteLine("Hello World!");
}
}
}
```
namespace HelloWorld {
class Hello {
static void Main( string [] args ){
System.Console.WriteLine("Hello World!");
}
}
}
C++
```C++
#include <iostream>
int main() {
std::cout << "Hello World!" ;
return 0 ;
}
```
#include <iostream>
int main() {
std::cout << "Hello World!" ;
return 0 ;
}