jeromegn / DocumentUp

Pretty documentation generator for Github projects with proper Readme.
http://documentup.com
884 stars 90 forks source link

[add] explicit syntax highlighting language override #28

Closed lennart closed 12 years ago

lennart commented 12 years ago

Hi Jerome,

I just experienced some issues with highlight.js' language auto-detection and decided to use marked's ability to parse

```any-given-language # => is parsed as 'any-given-language' in token.lang 
random:= code;


for explicitly highlighting a certain programming language.

This pull request includes a simple guard to only use this feature if `any-given-language` is containd in `highlight.js`' loaded syntaxes (`hljs.LANGUAGES`)
jeromegn commented 12 years ago

Sound about right!