addon/components/code-section.js
function (code, language, bare) {
    var result;
    if (typeof hljs !== 'undefined') {
      if (language) {
        try {
          result = hljs.highlight(language, code, true);
        }
        catch (e) {
          Ember.warn(
            '[marked] Failing to highlight some code with language `' + language +
            '`, trying auto-detecting language (error: ' + e + ').'
          );
          result = hljs.highlightAuto(code);
        }
      }
      else {
        result = hljs.highlightAuto(code);
      }
      result.value = '<pre><code>' + result.value + '</code></pre>';
      if (bare) {
        return result;
      }
      else {
        return result.value;
      }
    }
    else {
      result = '<pre><code>' + (code || '').replace(/<>&/g, entitiesReplacer) + '</code></pre>';
      if (bare) {
        return {value: result, language: null};
      }
      else {
        return result;
      }
    }
  }
function (code, language, bare) {
    var result;
    if (typeof hljs !== 'undefined') {
      if (language) {
        try {
          result = hljs.highlight(language, code, true);
        }
        catch (e) {
          Ember.warn(
            '[marked] Failing to highlight some code with language `' + language +
            '`, trying auto-detecting language (error: ' + e + ').'
          );
          result = hljs.highlightAuto(code);
        }
      }
      else {
        result = hljs.highlightAuto(code);
      }
      result.value = '<pre><code>' + result.value + '</code></pre>';
      if (bare) {
        return result;
      }
      else {
        return result.value;
      }
    }
    else {
      result = '<pre><code>' + (code || '').replace(/<>&/g, entitiesReplacer) + '</code></pre>';
      if (bare) {
        return {value: result, language: null};
      }
      else {
        return result;
      }
    }
  }
function ( code , language , bare ) { var result ; if ( typeof hljs !== 'undefined' ) { if ( language ) { try { result = hljs . highlight ( language , code , true ) ; } catch ( e ) { Ember . warn ( '[marked] Failing to highlight some code with language `' + language + '`, trying auto-detecting language (error: ' + e + ').' ) ; result = hljs . highlightAuto ( code ) ; } } else { result = hljs . highlightAuto ( code ) ; } result . value = '<pre><code>' + result . value + '</code></pre>' ; if ( bare ) { return result ; } else { return result . value ; } } else { result = '<pre><code>' + ( code || '' ) . replace ( / <>& / g , entitiesReplacer ) + '</code></pre>' ; if ( bare ) { return { value : result , language : null } ; } else { return result ; } } }
Highlighter function, using highlight.js if available

@method highlight
@param {String} code
@param {String} [language]
@param {Boolean} [bare=false]
@returns {String|{value: String, language: String}}
Highlighter function using highlight . js if available