Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


hilighter? #112

robogeek opened this Issue · 1 comment

2 participants


Your sample on the marked home page says to put this in the config

highlight: function(code, lang) {
    if (lang === 'js') {
      return highlighter.javascript(code);
    return code;

But I get this error

    throw e;
ReferenceError: highlighter is not defined
Please report this to
    at Object.marked.setOptions.highlight (/Users/davidherron/Node.JS/akashacms/lib/renderer.js:39:14)
    at Parser.tok (/Users/davidherron/node_modules/marked/lib/marked.js:818:33)
    at Parser.parse (/Users/davidherron/node_modules/marked/lib/marked.js:759:17)
    at Function.Parser.parse (/Users/davidherron/node_modules/marked/lib/marked.js:746:17)
    at marked (/Users/davidherron/node_modules/marked/lib/marked.js:996:19)
    at renderSync (/Users/davidherron/Node.JS/akashacms/lib/renderer.js:162:41)
    at Object.module.exports.render (/Users/davidherron/Node.JS/akashacms/lib/renderer.js:231:24)
    at process2html (/Users/davidherron/Node.JS/akashacms/index.js:222:14)
    at process_and_render_files (/Users/davidherron/Node.JS/akashacms/index.js:289:25)
    at async.forEach (/Users/davidherron/Node.JS/node_modules/async/lib/async.js:86:13)

That's just an example configuration. It's not meant to be used. It's just a way of illustrating how a highlighter can be used with marked.

@chjj chjj closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.