Source code highlighting in Markdown (currently Multimarkdown)

Alan Hogan contact at
Tue Sep 23 12:24:24 EDT 2014


It seems like you might already know of highlight.js: <>

I understand that this may not seem to address use case #2, but since highlight.js supports node.js, you can probably use it in your build scripts (instead of in the browser).

Note also that some Markdown flavors, such as Github Flavored Markdown and the sort-of fork CommonMark, have syntaxes for explicitly declaring which kind of code you’ve embedded into your document: <>

It looks like this:

* {
  font-family: "jokewood" !important;

You can compare various flavors’ output of this code, here:

> On Sep 23, 2014, at 5:43 AM, Jan Erik Moström <lists at> wrote:
> I'm using a script to convert a set of markdown files to static web
> sites - sites for various courses I'm teaching. This script uses
> multimarkdown to do the actual conversion.
> Since I mostly teach various programming courses I would like to have
> syntax highlighting of the source code I present.
> What is the best way to do this?
> I'm producing sites that is either:
> + Static webpages where I can decide everything (almost)
> + HTML that is included in a CMS where I have very very very very
> little control of how things should be displayed. I can basically
> enter HTML code in a field and hope that it turns out OK
> What recommendations do have for doing this?
> I can for example see that multimarkdown uses fenced code blocks that
> assumes that I have the ability to use a javascript library to do the
> actual syntax hightlighting. Which would work in the first case but
> probably not in the second.
> _______________________________________________
> Markdown-Discuss mailing list
> Markdown-Discuss at

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Markdown-Discuss mailing list