highlighter.js
function highlight (code, lang) {
  if (!lang) {
    return code
  }

  var isDiff = DIFF_REGEXP.test(lang)

  // Remove the diff suffix. E.g. "javascript.diff".
  lang = lang.replace(DIFF_REGEXP, '')

  // Ignore unknown languages.
  if (!isDiff && !supported(lang)) {
    return code
  }

  return isDiff ? diff(code, lang) : hljs.highlight(lang, code).value
}
function highlight (code, lang) {
  if (!lang) {
    return code
  }

  var isDiff = DIFF_REGEXP.test(lang)

  // Remove the diff suffix. E.g. "javascript.diff".
  lang = lang.replace(DIFF_REGEXP, '')

  // Ignore unknown languages.
  if (!isDiff && !supported(lang)) {
    return code
  }

  return isDiff ? diff(code, lang) : hljs.highlight(lang, code).value
}
function highlight ( code , lang ) { if ( ! lang ) { return code } var isDiff = DIFF_REGEXP . test ( lang ) // Remove the diff suffix. E.g. "javascript.diff". lang = lang . replace ( DIFF_REGEXP , '' ) // Ignore unknown languages. if ( ! isDiff && ! supported ( lang ) ) { return code } return isDiff ? diff ( code , lang ) : hljs . highlight ( lang , code ) . value }
Syntax highlighting in the format Marked supports.

@param  {String} code
@param  {String} lang
@return {String}
Syntax highlighting in the format Marked supports .