Background
For those who enjoy sharing code online, WordPress offers a viable platform.
WordPress
SyntaxHighlighter Code Block
Languages
Supported Languages
- actionscript3
- bash
- clojure
- coldfusion
- cpp
- csharp
- css
- delphi
- diff
- erlang
- fsharp
- groovy
- html
- java
- javafx
- javascript
- latex (you can also render LaTeX)
- matlab (keywords only)
- objc
- perl
- php
- powershell
- python
- r
- ruby
- scala
- sql
- text
- vb
- xml
Newer Languages
Unfortunately, some of the newer languages are not supported.
Sample Code – go
Go by Example: Hello World
Code Image
Code HTML
Code Rendered
package main import "fmt" func main() { fmt.Println("hello world") }
Rust By Example – Hello World
Code Image
Code HTML – Rust
Code Rendered – Rust
// This is the main function.
fn main()
{
// Statements here are executed when the compiled binary is called.
// Print text to the console.
println!("Hello World!");
}
Batch – Script
Code Image
Code HTML – DOS – Batch
Code Rendered – DOS – Batch
@echo off
SET /A a = 5
SET /A b = 10
SET /A c = %a% + %b%
echo %c%
SET /A c = %a% – %b%
echo %c%
SET /A c = %b% / %a%
echo %c%
SET /A c = %b% * %a%
echo %c%
Issues
If you determine that your intended language is not supported, please specify a related language.
Workaround
Outline
- For Rust
- Use a language similar to c, such as
- cpp
- csharp
- Use a language similar to c, such as
- For DOS/Batch
- Use a similar OS Scripting language, such as
- bash ( Unix/Linux )
- Use a similar OS Scripting language, such as
Rust
Code HTML – Rust – Intended – Cpp – Used
Code Rendered – Rust
// This is the main function. fn main() { // Statements here are executed when the compiled binary is called. // Print text to the console. println!("Hello World!"); }
Code HTML – DOS Batch – Intended – Bash – Used
Code Rendered – DOS – Batch
@echo off SET /A a = 5 SET /A b = 10 SET /A c = %a% + %b% echo %c% SET /A c = %a% - %b% echo %c% SET /A c = %b% / %a% echo %c% SET /A c = %b% * %a% echo %c%
Summary
Not Noted, But are
There are languages that are not noted as supported such as:-
- go
But are supported, by specifying as is.
Not Noted, But are
There are languages that are not noted as supported such as:-
- Intented:- rust
- Supported
- cpp
- csharp
- Supported
- Intented:- DOS Batch
- Supported
- bash ( Unix / Linux )
- Supported
But are supported, by specifying variant.