evilstreak / markdown-js

A Markdown parser for javascript
7.69k stars 863 forks source link

Does markdown-js support code syntax highlight? #155

Closed clker closed 10 years ago

clker commented 10 years ago

Or any other plugin is suggested to use?

evilstreak commented 10 years ago

I've used highlight.js with markdown-js to mark up code snippets on my (totally defunct) blog: http://evilstreak.co.uk/blog/fixing-change-events-on-radios

If you use the Maruku dialect of markdown-js you can add a class to the code block which highlight.js will use to see the language for highlighting.

    // say hello
    alert('Hello, world!');
  {:.javascript}