# Testing Online Code Syntax Highlighters for Blogs (6): Multilingual Source Code Display in Web Pages

Note: This post won’t make sense here. Refer to the original post.

One of my earlier posts suggests that SyntaxHighlight supports only one language in a pre tag without proof. Before embedding a source code list to show this, I’ll make more assertions and then verify them.

highlight.js has the support, while google-code-prettify doesn’t. For example, you want to attach the following Matlab code to your blog entry. SyntaxHighlight doesn’t have the Matlab support. For highlight.js, here’s the result.

When I was writing the post, highlight.js didn’t worked right, but as I gave up trying it and view this post on the next day, things just go fine.

We just see how google-code-prettify works.

Code copied from Applications of Matlab in Engineering.

Note: In the official README, it’s said that we specify the lang-* class by its file extension (i.e. m), but in the page that display the source code of lang-matlab.js on Google Code, it points to the author’s Github repository, which has a README file. According to that file, the HTML tag should be <pre class="prettyprint lang-matlab">, instead of <pre class="prettyprint lang-m">.

So when one embeds the above source code list using google-code-prettify, one would write

Let’s go back to the topic.

## SyntaxHighlighter

The SyntaxHighlighter code for embedding Java:

As the language in determined by brush: html, there’s no multiple language feature in SyntaxHighlighter.

## highlight.js

So highlight.js can display multiple languages at one container.