Created
December 11, 2013 18:34
-
-
Save gnab/7915894 to your computer and use it in GitHub Desktop.
Syntax highlighting Markdown code blocks with Harp.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require('harp').server(__dirname + '/public', { port: process.env.PORT || 5000 }); | |
var marked = require('./node_modules/harp/node_modules/terraform/node_modules/marked'); | |
var highlight = require('highlight.js'); | |
marked.setOptions({ | |
langPrefix: '', | |
highlight: function (code, language) { | |
if (language) { | |
return highlight.highlight(language, code).value; | |
} | |
return code; | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment