I’m a new blogger on wordpress.com. My blog is primarily share my experience about programming.
At the first, I intended to post a entry about “dot dot dot notation in C++”, but I was so surprise because I didn’t know how to highlight my code. And of course, I tried to install a syntax highlighting plugin to do this. But…
After an half-hour researching, I found that this host blogging doesn’t support me to install any plug-in. That was a nightmare.
I had been continuing searching for an half-hour again and fortunately, I found this page:
It say that: “While WordPress.com doesn’t allow you to use potentially dangerous code on your blog, there is a way to post source code for viewing. We have created a shortcode you can wrap around source code that preserves its formatting and even provides syntax highlighting for certain languages, like so:
[sourcecode="your_programming_language"] // Your code [sourcecode]
With your_programming_language is any language signature listed bellow.
It’s clearly to understand, let’s take an example now:
// Your C# code Console.WriteLine("Hello C#");
Awesome, now, let’s take your eyes for all language that you can highlight as bellow:
- matlab (keywords only)
Enjoy and hope that help you save a lot of time.